Run Agents

Examples

Explore the runnable Harness project and the ten agent patterns it demonstrates.

The Harness examples project is a developer-owned, runnable reference application. It owns its Hono host, model-provider adapter, local persistence, and Studio protocol implementation, so each part of an agent server remains visible in application code.

Use Run Locally to install and configure it. After starting the server, open Studio, choose an agent, and send a prompt to inspect its manifest, session activity, approvals, and canonical events.

Included agents

ExampleBrief
InstructionsThe smallest starting point: constructor instructions and a model adapter, with no tools, skills, or policy.
SkillsExposes a local SKILL.md catalog and loads a procedure on demand through load_skill.
Tool UseGives the model in-process calculate, now, and convert tools without approval gates or an external runtime.
GuardrailsApplies input, output, tool-input, and tool-output policy around publish and lookup operations.
InteractionsPauses for a person's answer and requires approval before saving a note.
Local MCPConnects to a bundled stdio MCP server, discovers its schema-bound tool, and closes the client with the host.
SandboxRuns filesystem and shell tools in a resource-limited, network-disabled Docker workspace; requires Docker and npm run docker:preflight.
Code ModePresents the same calculation, conversion, and time tools as a generated TypeScript SDK, leaving run_code as the only model-callable tool.
SubagentsCoordinates the Instructions, Skills, and Tool Use agents through one delegate tool.
Coding AgentSends coding work to a host-installed Codex CLI in a temporary workspace after approval; requires Codex and npm run codex:preflight.

Project map

The examples are deliberately conventional TypeScript application code rather than generated configuration. Start with the agent registry, which registers all ten agents, then inspect agents/ for composition and capabilities/ for the small reusable integrations each agent attaches.

Keep credentials in the host

Configure provider credentials in the example server environment. Studio configuration, manifests, and emitted records should never carry provider keys or raw provider payloads.

On this page