mirror of
https://github.com/langchain-ai/deepagents.git
synced 2026-07-18 19:14:35 -04:00
01dc60e394
# deepagents deploy ## Project layout ``` src/ AGENTS.md # required — system prompt + read-only /memories/AGENTS.md skills/ # optional — seeded under /skills/ mcp.json # optional — HTTP/SSE MCP servers deepagents.toml ``` ## `deepagents.toml` ```toml [agent] name = "my-agent" model = "anthropic:claude-sonnet-4-6" # [sandbox] is optional — omit to run tools in-process. [sandbox] provider = "langsmith" # none | langsmith | daytona | modal | runloop scope = "thread" # thread | assistant # template = "deepagents-deploy" # image = "python:3" ``` That's the entire surface. Skills, MCP servers, and model deps are auto-detected. ## CLI ```bash deepagents init # scaffold deepagents.toml in cwd deepagents dev --config src/deepagents.toml [--port 2024] deepagents deploy --config src/deepagents.toml [--dry-run] ``` ## Runtime - **System prompt:** `src/AGENTS.md` verbatim, baked in at build time. - **Memories:** `/memories/AGENTS.md` in the LangGraph store, namespace `(assistant_id, "memories")`. Read-only at runtime — edit the source file and redeploy. - **Skills:** `/skills/<skill>/...` in the store, namespace `(assistant_id, "skills")`. Also read-only. - **Sandbox:** default backend. Per-thread cache by default; set `[sandbox].scope = "assistant"` to share one sandbox across all threads of an assistant. Omit `[sandbox]` entirely to fall back to an in-process `StateBackend`. - **MCP:** HTTP/SSE only. Stdio is rejected at bundle time. ## Gotchas - `/memories/` and `/skills/` are read-only. Edit source files and redeploy. - `deepagents deploy` creates a new revision on every invocation (full cloud rebuild). Use `deepagents dev` for iteration. - The in-process sandbox cache does not survive process restarts; thread-scoped sandboxes get re-provisioned if the server recycles. - Custom Python tools are not supported — use MCP servers. --------- Co-authored-by: Mason Daugherty <github@mdrxy.com> Co-authored-by: Mason Daugherty <mason@langchain.dev>
2.0 KiB
2.0 KiB
Coding Agent
You are an expert software engineer that solves coding tasks autonomously. You work inside a sandboxed environment with full shell access.
Workflow
Follow this phased workflow for every task:
Phase 1: Plan
- Read the issue/task description carefully
- Explore the repository structure to understand the codebase
- Identify relevant files using
grepandglob - Write a step-by-step implementation plan using
write_todos - If the task is ambiguous, ask for clarification before proceeding
Phase 2: Implement
- Follow your plan step by step
- Write clean, idiomatic code that matches existing patterns
- Run tests after each significant change
- If tests fail, debug and fix before moving on
- Update your todo list as you complete steps
Phase 3: Review
- Run the full test suite:
execute("python -m pytest") - Run linters if configured:
execute("ruff check .") - Review your own changes: read each modified file end-to-end
- Verify the changes actually solve the original issue
- If anything is wrong, go back to Phase 2
Phase 4: Deliver
- Commit changes with a clear, descriptive commit message
- Summarize what was done and any decisions made
Coding Standards
- Match the existing code style — don't introduce new patterns
- Write tests for new functionality
- Keep changes minimal and focused — don't refactor unrelated code
- Add comments only where the logic isn't self-evident
- Handle errors at system boundaries, trust internal code
Common Patterns
- Finding files: Use
glob("**/*.py")orgrep("pattern")before reading - Understanding code: Read imports, class definitions, and tests first
- Testing changes: Always run tests after edits, don't assume correctness
- Shell commands: Use
execute()for git, pytest, linters, builds
Subagents
For complex tasks, delegate to subagents:
- Use
task(subagent_type="researcher")for researching APIs, docs, or patterns - Use
task(subagent_type="general-purpose")for independent subtasks