A runtime for agents you can inspect.

Shiro gives TypeScript agents a real execution model: provider calls, tools, handoffs, approvals, memory, and traces all move through the same run.

pnpm add @shiro-sdk/core @shiro-sdk/openai zod
copied

live shiro run

exit 02.4strace linked

Build, run, inspect

Build the run. Watch it execute.

The example on the left creates the run. The panels on the right show the state Shiro emits while it executes.

shiro-example.ts
1import { Agent, Engine, tool } from "@shiro-sdk/core";2import { openai } from "@shiro-sdk/openai";34const deploy = tool({5  name: "deploy",6  requiresApproval: true,7  execute: async ({ target }) => ({ target, status: "queued" }),8});910const agent = new Agent({11  name: "release-manager",12  provider: openai({ model: "gpt-5" }),13  tools: [deploy],14});1516await new Engine().run(agent, "Ship the canary build.");
Run state
WAITING
Input: ship a canary build with a required approval.
shiro / agentmodel: gpt-5

Run paused. Waiting for deploy approval.

agent run trace

exit 02.4strace linked

Execution stream

The log is part of the product.

Shiro exposes the run as structured events, so application code and Studio see the same provider calls, tool spans, handoffs, and approval waits.

agent.stream()

exit 02.4strace linked

Run pipeline

One run, visible from input to output.

event stream active

active: Triage Agent

Triage Agent

Instructions, model, tools, memory, and policy are resolved for this run.

Step 2 of 5

agent-flow-trace.tsTypeScript
// Triage Agent
const result = await engine.execute(agent, input);
traces.on("agent.plan()", event => studio.record(event));
await traces.export(new JsonTraceExporter());

Runtime features

The parts you need when agents leave the demo.

Shiro keeps operational concerns in the runtime instead of scattering them across app code.

Provider Adapters

Keep provider code behind one small interface.

provider.use(openai(), anthropic(), custom())

Approval Gates

Pause specific tools until a reviewer approves the action.

requiresApproval: true

Memory Sessions

Attach durable context without mutating agent definitions.

session.getMessages()

Structured Outputs

Validate final answers before they leave the run.

output: z.object({ ... })

Full Tracing

Persist model calls, tools, handoffs, approvals, and timing.

result.trace.steps

Studio UI

Use Studio to inspect runs while you build and debug.

studio.open(run.id)
0

runtime dependency

Zod core only

0%

typed SDK surface

Strict TypeScript inference

0

core execution layers

Visible pipeline

0

Studio workspaces

Local product UI

Providers are adapters, not architecture.

The engine depends on Shiro’s provider contract. Use `@shiro-sdk/openai` today, or implement the same interface for another model without changing agent code.

provider.call uses the same trace shape no matter which model adapter fulfills the request.

Shiro Studio

Studio is where runs become debuggable.

Inspect a timeline, open an approval, follow a handoff, and compare memory state without adding one-off debug screens to your app.

Explore tracing
Trace Viewer
Approval Center
Memory Sessions
Execution Graph

Start with a single run.

Add a provider, define one tool, and stream the trace before you build the surrounding app.

pnpm add @shiro-sdk/core @shiro-sdk/openai zod
copied