Skip to content
Back to skills

Deepagents Harness

ASecurity

Use when designing long-horizon agents that need subagents, isolated context windows, filesystem-backed work, persistence, human approval, MCP tools, or production tracing.

  • 10 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 10, 2026
ai-agentspythongoshellreactgitdocumentation

Works with

  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 10, 2026

npx -y skills add mouadja02/skills --skill deepagents-harness --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Deepagents Harness?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Deepagents Harness
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mouadja02-deepagents-harness/badge)](https://www.skillsdirectory.com/skills/mouadja02-deepagents-harness)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: deepagents-harness
description: Use when designing long-horizon agents that need subagents, isolated context windows, filesystem-backed work, persistence, human approval, MCP tools, or production tracing.
source: "https://github.com/langchain-ai/deepagents"
---

# Deep Agents Harness

Design long-running agents as a harness with explicit state, bounded delegation, durable artifacts, and reviewable tool calls. Use a higher-level harness when the work needs more than one ReAct loop.

## Use When

- The agent must plan, delegate, write files, run tools, and resume after interruption.
- Tool output is too large for the context window and needs filesystem offload.
- Subagents need separate context windows or specialist instructions.
- Humans must approve, edit, or reject high-risk actions.
- You need production traces, checkpoints, evals, or deployment hooks.

## Harness Design

1. Define the persistent state object: task, plan, artifacts, decisions, approvals, and final output.
2. Split capabilities into tools, subagents, filesystem, memory, shell, and human review.
3. Give each subagent a narrow contract: inputs, allowed tools, expected artifacts, and stop condition.
4. Store bulky observations as files and pass summaries plus paths through the state.
5. Add approval gates for network calls, shell commands, writes outside workspace, credential access, deletes, and external side effects.
6. Trace every step with state diffs, tool inputs, tool outputs, and handoff reasons.
7. Evaluate the trajectory, not just the final answer.

## Decision Table

| Need | Pattern |
| --- | --- |
| Short single-step assistant | Plain tool-calling agent |
| Stateful workflow with branches | LangGraph-style graph |
| Long-horizon work with files and subagents | Deep agent harness |
| Tool execution can affect users or infrastructure | Human-in-the-loop gate |
| Agent needs learned project practices | Durable memory plus context evolution |

## Handoff Contract

Every subagent handoff should include:

- Goal and non-goals.
- Allowed files and tools.
- Evidence to collect.
- Output artifact path.
- Review criteria.
- Failure status vocabulary: `DONE`, `DONE_WITH_CONCERNS`, `NEEDS_CONTEXT`, `BLOCKED`.

See [harness-contracts.md](references/harness-contracts.md) for reusable templates.

## Common Mistakes

| Mistake | Fix |
| --- | --- |
| Letting subagents explore the whole repo | Give exact files, commands, and output contracts |
| Passing huge tool outputs through chat | Store them as artifacts and pass summaries |
| Treating checkpoints as logs only | Resume from checkpoints and test recovery |
| Adding memory without invalidation | Version memory and attach evidence |
| Evaluating only pass/fail | Inspect trajectory quality, retries, dead ends, and repair behavior |

## References

- GitHub: langchain-ai/deepagents - https://github.com/langchain-ai/deepagents
- GitHub: langchain-ai/langgraph - https://github.com/langchain-ai/langgraph
- LangGraph documentation - https://docs.langchain.com/oss/python/langgraph/
- LangSmith documentation - https://docs.smith.langchain.com/

Files in this skill

  • SKILL.md3 KB
  • references/harness-contracts.md908 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…