ISH: Isolated State Harness
ISH (Isolated State Harness) is an unconstrained, protocol-driven execution harness for AI agents and durable workflows.
The name draws inspiration from the classical Sanskrit root īś
(ईश्), meaning “to govern, command, or master” — reflecting sovereign
authority and precise execution control over LLMs, tools, subagents, and
environments without forcing model-driven agents into a fixed workflow.
Deterministic pipelines are available through the separate, unified
DurableWorkflow primitive.
ISH is a runtime for building tool-using agents and durable workflows. It gives your application two ways to run work:
New to ISH? Start with the plain-language adopter guide, which explains installation status, agent setup, saved state, and workflows without requiring Rust knowledge.
- Python
- TypeScript
- Rust
- Go
- C#
- Java
import asyncio
from ish import Agent, ContextStore
async def main() -> None:
context = ContextStore(initial_data={"case_status": "under_review"})
agent = Agent(
name="reviewer",
model="gpt-4o-mini",
instructions="Summarize the active case status from context.",
context=context,
)
result = await agent.run("What is the current case status?")
print(result.content)
asyncio.run(main())
import { Agent, ContextStore, createClient } from "ish-harness";
const client = createClient();
const context = new ContextStore(client);
context.set("case_status", "under_review", { author: "host" });
const agent = new Agent({
name: "reviewer",
model: { provider: "openai_chat", name: "gpt-4o-mini" },
instructions: "Summarize the active case status from context.",
context,
});
try {
const result = await agent.run("What is the current case status?");
console.log(result.content);
} finally {
agent.close();
context.close();
client.close();
}
use std::{env, io, sync::Arc};
use ish_harness::{Agent, ContextStore, OpenAIModel};
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let context = ContextStore::new();
context.set("case_status", json!("under_review"), "host", "", None);
let model = OpenAIModel::new(
"gpt-4o-mini".into(),
"https://api.openai.com/v1".into(),
env::var("OPENAI_API_KEY")?,
0.2,
);
let agent = Agent::builder(Arc::new(model))
.name("reviewer")
.instructions("Summarize the active case status from context.")
.context(context)
.build()
.map_err(io::Error::other)?;
let result = agent
.run("What is the current case status?")
.await
.map_err(io::Error::other)?;
println!("{}", result.content);
Ok(())
}
package main
import (
"context"
"fmt"
"github.com/ish-harness/ish-harness/sdks/go"
)
func main() {
client, err := ish.NewClient()
if err != nil {
panic(err)
}
defer client.Close()
store, err := ish.NewContextStore(client, "")
if err != nil {
panic(err)
}
defer store.Close()
if _, err := store.Set("case_status", "under_review"); err != nil {
panic(err)
}
agent := ish.NewAgent(client, ish.AgentRunRequest{
AgentName: "reviewer",
Model: &ish.AgentModel{Provider: "openai_chat", Name: "gpt-4o-mini"},
SystemPrompt: ish.StringPtr("Summarize the active case status from context."),
Context: store,
})
res, err := agent.Run(context.Background(), "What is the current case status?")
if err != nil {
panic(err)
}
fmt.Println(res["content"])
}
using Ish.Harness;
using var ish = new IshClient();
using var context = new ContextStore(ish);
context.Set("case_status", "under_review", author: "host");
var result = ish.Run(new AgentRunRequest
{
AgentName = "reviewer",
Model = new AgentModel { Provider = "openai_chat", Name = "gpt-4o-mini" },
SystemPrompt = "Summarize the active case status from context.",
UserPrompt = "What is the current case status?",
Context = context,
});
Console.WriteLine(result.GetProperty("content").GetString());
import io.github.ishharness.ContextStore;
import io.github.ishharness.IshClient;
import java.nio.file.Path;
public class Main {
public static void main(String[] args) {
try (var ish = new IshClient(Path.of(System.getenv("ISH_NATIVE_LIBRARY")));
var context = new ContextStore(ish)) {
context.set("case_status", "under_review");
var request = new IshClient.AgentRequest(
"gpt-4o-mini",
"Summarize the active case status from context.",
"What is the current case status?")
.provider("openai_chat")
.agentName("reviewer")
.context(context);
System.out.println(ish.runAgent(request).path("content").asText());
}
}
}
Agentlets a model choose tools as it works through a request.DurableWorkflowruns steps and branches that your application defines.
Both can use the same Rust runtime and persistence engine. The six SDKs—Python, TypeScript, Rust, Go, C#, and Java—provide language-native APIs that dispatch shared operations to that runtime and bridge host callbacks, transports, and resource lifetimes. Large tool results and shared working data can stay in runtime storage instead of being copied into every model request. The optional Control Plane provides an HTTP service for traces, metrics, and database inspection; agents do not need it to run.
The model still does the reasoning. ISH runs the tool loop, applies configured policies, stores state, and handles pauses and recovery around model calls.
One runtime, six language SDKs
Read the diagram from left to right: your application uses one SDK; both execution styles use shared Rust runtime operations and can use the same persistence. The SDK also supplies host-language callbacks and any native or HTTP/MCP transport adapters needed by the application. The Control Plane is an optional observer of stored data, not a required runtime service.
Choose how to run work
| Use | When | Who decides the next action? |
|---|---|---|
Agent | The request needs model reasoning and tool use | The model, based on the conversation and tool results |
DurableWorkflow | The process has known steps, branches, approvals, or replay requirements | Your workflow definition |
These are complementary: a workflow step can call an agent, and an agent can delegate to subagents. Use a workflow when the order and branching rules must be explicit; use an agent when the next action depends on what the model learns.
What happens during a run
- The SDK dispatches shared runtime operations and registers any host callbacks the runtime needs to invoke.
- An agent asks the model for a response or tool call; a workflow selects its next declared step.
- ISH runs configured tools and policies. Large results may be stored outside the conversation and represented there by a compact reference.
- When persistence is configured, ISH records run state so supported work can be inspected or resumed after interruption.
The exact behavior depends on the feature and storage setting. Replaying a workflow step does not guarantee that a separate service action ran only once. For actions such as charging a card, use a request ID that makes retries safe, or check the service before retrying.
Shared capabilities
- Context and memory: Keep shared values and large artifacts outside the prompt, then retrieve relevant pieces when needed. See Context concepts.
- Safety: Configure permissions, approvals, and content guardrails around model and tool calls. See Guardrails.
- Durability: Persist traces, workflow steps, and checkpoints with the Rust storage layer. See Persistence.
- Integrations: Connect model providers and protocols such as MCP, A2A, ACP, and AG-UI. See Integrations.
The six SDKs share a behavioral conformance suite. See Language SDKs for installation, platform support, and details about how the shared runtime is bound into each language.
State, in plain language
These terms describe separate kinds of information an agent may use:
- Conversation history is the dialogue: user messages, assistant replies, and tool calls/results for one session. A persistence store plus a stable session ID writes it to the database. See Short-Term Dialogue.
- Working context is short-term task state that tools or collaborating
agents can read and update.
ContextStorekeeps JSON values and documents; persistence is opt-in. See Context. - Long-term memory is searchable information intended to be recalled in
later conversations.
MemoryStoreis in memory by default and can be saved to a database with persistence enabled. See Memory. - Persistence store is the configured SQLite database file or a
StorageConnectorthat writes records to a database or service your application operates. See SQLite WAL and Storage Connectors.
Start here
Follow this path if you are new to ISH:
- Run your first agent in the language you use.
- Add tools and configure an agent.
- Choose where working data belongs: in the model conversation, shared context, or artifact storage.
- Add memory when information must be available across runs, or use a durable workflow when your code owns the process steps.
- Add permissions and guardrails before exposing tools that can change data.
Use Language SDKs for setup and platform requirements, or the Rust quickstart if you want to call the native Rust APIs directly. The integrations guide covers model providers, protocols, and HTTP servers.