Deep Agents
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.
Scaffold
Section titled “Scaffold”tanomis agent new research-assistant --harness deepagents --agents-root ./agentsThe entrypoint
Section titled “The entrypoint”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.
Keep the generated dependencies
Section titled “Keep the generated dependencies”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:
cd agents/research-assistantuv sync --frozenuv lock --lockedWho owns what
Section titled “Who owns what”| 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.
Approval-aware tools
Section titled “Approval-aware tools”policy: approval_required_tools: - execute enable_ask_user: trueThe 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.
Where to go next
Section titled “Where to go next”- Write your agent: the contract every harness shares.
- Manifest essentials: models, tools, hosts, limits.
- Approval-required actions: what a paused run looks like from your application.