@agent-harness-experimental/adapter-deepagents
Adapter for running DeepAgents
(LangGraph-based) as an agent inside agent-harness-experimental.
This is a Python-based adapter — the bridge script runs on python3.13 inside
the unified sandbox image.
Install
npm install agent-harness-experimental @agent-harness-experimental/adapter-deepagents
Usage
import { createAgentSession } from "agent-harness-experimental";
import { deepAgents } from "@agent-harness-experimental/adapter-deepagents";
const agent = createAgentSession({
adapter: deepAgents(),
});
const result = await agent.generate("Analyze this codebase and suggest improvements");
console.log(result.text);
await agent.close("stop");
Configuration
deepAgents({
// Model ID (uses colon format internally for LangChain)
model: "claude-sonnet-4",
});
| Option | Type | Default | Description |
|---|
model | string | — | Model ID |
auth | object | — | Optional per-adapter auth override (gateway or anthropic) |
Sandbox runtime options such as template, timeoutMs, and httpHandler
belong on createAgentSession({ sandbox }).
const agent = createAgentSession({
adapter: deepAgents({ model: "claude-sonnet-4" }),
sandbox: {
template: "snap_abc123",
timeoutMs: 60000,
httpHandler: async (request: Request) => fetch(request),
},
});
Auth
auth is optional. If you omit it, DeepAgents uses the shared ambient
gateway/OIDC fallback first: AI_GATEWAY_API_KEY, then VERCEL_OIDC_TOKEN.
deepAgents({
model: "claude-sonnet-4",
auth: {
anthropic: {
apiKey: { env: "ANTHROPIC_TEAM_B_API_KEY" },
},
},
});
DeepAgents exposes standardized builtin names through agent-harness-experimental. The native runtime names are shown for reference:
| Tool | Native Tool | Description |
|---|
read | read_file | Read file contents |
write | write_file | Write file |
bash | shell | Execute shell command |
searchFiles | search | Search files for pattern |
Features
- Python bridge: Runs on
python3.13 with LangGraph inside the shared sandbox image
- Skills: Written to a combined
.skills.md file
- Multi-turn: Uses LangGraph MemorySaver for conversation state (in-memory,
not durable across stop/restart)
Notes
- Model names are converted to LangChain colon format internally
(
anthropic:claude-sonnet-4, not anthropic/claude-sonnet-4)
create_deep_agent() does not accept an instructions parameter — instructions
are prepended to the prompt instead