Integrations
The integration layer connects agents to external models, tools, sandboxes, durable stores, and servers while keeping shared policy, persistence, and safety logic in the Rust runtime.
- Python
- TypeScript
- Rust
- Go
- C#
- Java
import asyncio
from ish import Agent, OpenAICompatibleModel, SQLiteLogger, filesystem_tools
async def main() -> None:
logger = SQLiteLogger(db_path="./data/traces.db")
await logger.initialize()
agent = Agent(
name="workspace_assistant",
model=OpenAICompatibleModel(model="gpt-4o-mini"),
instructions="Inspect workspace files and summarize changes.",
tools=filesystem_tools(root_dir="./workspace"),
persistence=logger,
)
try:
result = await agent.run("List files in the workspace.")
print(result.content)
finally:
agent.close()
await logger.close()
asyncio.run(main())
import { Agent, IshClient, PersistenceStore, Sandbox } from "ish-harness";
const client = new IshClient();
const sandbox = new Sandbox(client, "./workspace");
const store = new PersistenceStore(client, "./data/traces.db", "DiskSync");
const agent = new Agent({
name: "workspace_assistant",
model: { provider: "openai_chat", name: "gpt-4o-mini" },
instructions: "Inspect workspace files and summarize changes.",
tools: sandbox.agentTools(),
persistence_handle: store.handle,
max_turns: 4,
});
try {
const result = await agent.run("List files in the workspace.");
console.log(result.content);
} finally {
agent.close();
store.close();
sandbox.close();
client.close();
}
use std::sync::Arc;
use ish_harness::persistence::SqliteWalLogger;
use ish_harness::sandbox::LocalSandbox;
use ish_harness::{Agent, OpenAIModel, RunnerConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api_key = std::env::var("OPENAI_API_KEY")?;
let model = Arc::new(OpenAIModel::new(
"gpt-4o-mini".to_string(),
"https://api.openai.com/v1".to_string(),
api_key,
0.0,
));
let sandbox = LocalSandbox::new("./workspace");
let workspace_entries = sandbox.glob("*", ".")?;
let logger = SqliteWalLogger::new("./data/traces.db")?;
let config = RunnerConfig { wal_logger: Some(logger), ..RunnerConfig::default() };
let agent = Agent::builder(model)
.name("workspace_assistant")
.instructions("Inspect workspace files and summarize changes.")
.config(config)
.max_turns(4)
.build()?;
let result = agent.run(format!("Summarize these workspace entries: {workspace_entries}")).await?;
println!("{}", result.content);
Ok(())
}
package main
import (
"context"
"fmt"
ish "github.com/ish-harness/ish-harness/sdks/go"
)
func main() {
client, err := ish.NewClient()
if err != nil {
panic(err)
}
defer client.Close()
sandbox, err := ish.NewSandbox(client, "./workspace")
if err != nil {
panic(err)
}
defer sandbox.Close()
store, err := ish.NewPersistenceStore(client, "./data/traces.db", "DiskSync", nil, "")
if err != nil {
panic(err)
}
defer store.Close()
tools, err := sandbox.AgentTools()
if err != nil {
panic(err)
}
agent := ish.NewAgent(client, ish.AgentRunRequest{
AgentName: "workspace_assistant",
Model: &ish.AgentModel{Provider: "openai_chat", Name: "gpt-4o-mini"},
SystemPrompt: ish.StringPtr("Inspect workspace files and summarize changes."),
Tools: tools,
MaxTurns: ish.IntPtr(4),
PersistenceHandle: store.Handle,
})
result, err := agent.Run(context.Background(), "List files in the workspace.")
if err != nil {
panic(err)
}
fmt.Println(result["content"])
}
using System;
using Ish.Harness;
using var client = new IshClient();
using var sandbox = new Sandbox(client, "./workspace");
using var store = new PersistenceStore(client, "./data/traces.db", "DiskSync");
var result = client.Run(new AgentRunRequest
{
Model = new AgentModel { Provider = "openai_chat", Name = "gpt-4o-mini" },
SystemPrompt = "Inspect workspace files and summarize changes.",
UserPrompt = "List files in the workspace.",
Tools = sandbox.AgentTools(),
PersistenceHandle = store.Handle,
MaxTurns = 4
});
Console.WriteLine(result.GetProperty("content").GetString());
import com.fasterxml.jackson.databind.JsonNode;
import io.github.ishharness.IshClient;
import io.github.ishharness.PersistenceStore;
import io.github.ishharness.Sandbox;
import java.nio.file.Path;
public class IntegrationExample {
public static void main(String[] args) {
try (var client = new IshClient(Path.of(System.getenv("ISH_NATIVE_LIBRARY")));
var sandbox = new Sandbox(client, "./workspace");
var store = new PersistenceStore(client, "./data/traces.db", "DiskSync", null, null)) {
var request =
new IshClient.AgentRequest(
"gpt-4o-mini",
"Inspect workspace files and summarize changes.",
"List files in the workspace.")
.provider("openai_chat")
.maxTurns(4)
.persistenceHandle(store.handle());
for (JsonNode tool : sandbox.agentTools()) {
request.operationTool(tool);
}
JsonNode result = client.runAgent(request);
System.out.println(result.path("content").asText());
}
}
}
| Integration | Purpose | Link |
|---|---|---|
| Models | OpenAI-compatible, Anthropic, Gemini, mock/host adapters, and model.decide | Model Providers |
| Protocols | MCP, A2A, ACP, and AG-UI event streaming | Protocol Stack |
| Sandboxes | Local workspace sandboxes, kernel isolation, WASI, and path permissions | Sandboxes |
| Persistence | SQLite WAL, execution logs, snapshots, and enterprise SQL | Persistence |
| HTTP server and Control Plane | Host-native agent HTTP adapters and shared policy validation | HTTP Server, Control Plane |
Unified runtime integration
Host SDKs provide ready-made sandbox tool descriptors that can be attached to an agent. The Rust API exposes the same sandbox capabilities for application code to wrap in its own tool function; constructing a sandbox by itself does not mount tools on an agent. The Rust example therefore passes a directory listing into the agent prompt directly. Persistence is configured separately and can be attached to a run or Rust runner configuration. See Sandbox setup and SQLite WAL for full setup details.