Skip to content
Open Console

Deep Agents

1 min readUpdated

With the Deep Agents harness your entrypoint returns a compiled LangGraph graph built by create_deep_agent. Tanomis resolves the tenant-approved model before the graph is created, roots the checkpointer and filesystem backend in the session workspace, and turns the manifest’s approval list into tool interrupts.

Terminal
tanomis agent new research-assistant --harness deepagents --agents-root ./agents
agents/research-assistant/agent.py
from __future__ import annotations
def create_agent(input_payload, context):
from deepagents import create_deep_agent
def classify_request(text: str) -> str:
"""Classify a request as question, incident, or feedback."""
normalized = text.lower()
if "error" in normalized or "failed" in normalized:
return "incident"
if "?" in text:
return "question"
return "feedback"
return create_deep_agent(
model=context.runtime_context.model,
tools=[classify_request],
system_prompt=(
"Classify the request, explain the evidence, and recommend one next action."
),
)

Import deepagents inside the callable so the module imports without the SDK, which is what the generated contract test relies on. Pass context.runtime_context.model through unchanged.

The scaffold pins Deep Agents, the workspace SQLite checkpointer, and the provider adapters the managed model route requires. Do not remove an adapter because the manifest’s model name looks like a different provider; the gateway may route it there. Lock before you deploy:

Terminal
cd agents/research-assistant
uv sync --frozen
uv lock --locked
Concern Owner
Tools, system prompt, middleware, structured output, subagents You
Workspace root and the runtime session or thread ID Runtime
Default checkpointer and persistent store Runtime
Resolved model and provider credentials Runtime
Filesystem backend root and platform deny rules Runtime
Additional in-workspace backend routes You, within manifest policy
Tool interrupts Composed from the manifest’s approvals and your configuration

The generated manifest uses workspace-sqlite checkpointing and the workspace-composite backend. Keep those defaults for the first deployment.

agent.yaml
policy:
approval_required_tools:
- execute
enable_ask_user: true

The runtime combines that list with your own interrupt_on configuration. The approval surface supports approve, reject, and user answers; do not design a tool that needs edited arguments as an approval outcome.