بنقرة واحدة
generate-agent
Generate a deepagents-based operational agent project from templates and design document
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate a deepagents-based operational agent project from templates and design document
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Run AST guard validation on a generated agent project and auto-fix violations
Create a standardized operational agent for a component — orchestrates the full analyze → design → generate → validate workflow
Analyze a component's codebase to understand its logging, metrics, and infrastructure for ops agent creation
Design an operational agent based on codebase analysis, determining tools, config, and system prompt content
| name | generate-agent |
| description | Generate a deepagents-based operational agent project from templates and design document |
You are generating a complete operational agent project based on the design from the previous step.
<component>-design.md file exists from the design steptemplates/ directorytools/ directory<component>-design.mdtemplates/ directorytools/Create <component_name>-ops-agent/ in the working directory with the standard structure:
<component_name>-ops-agent/
├── pyproject.toml
├── config/
│ └── agent.yaml
├── agent.py
├── models.py
├── tools/
│ ├── __init__.py
│ ├── log_search.py
│ ├── metric_query.py
│ └── <additional_tools>.py
├── prompts/
│ └── system.md
├── skills/
│ └── troubleshooting/
│ └── SKILL.md
└── tests/
├── test_tools.py
└── test_agent.py
For each file, use the corresponding template from templates/ as your base. Fill in the placeholders with values from the design document.
Important rules:
tools/ as examples for how tools should work_get_*_config() pattern (not module-level loading)For additional tools (Kafka, DB, etc.) that don't have templates:
tools/http_client.py_get_*_config() private helperagent.py includes:
SummarizationMiddleware for compressing long conversationsMemorySaver checkpointer for conversation persistence--once "query" flag for single invocation--diagnose --once "query" flag for structured DiagnosisReport outputUsing templates/models.py.tmpl, generate the DiagnosisReport model. This provides structured output when the agent is run with --diagnose --once "query".
Using templates/prompts/system.md.tmpl as the base, create a rich system prompt that includes:
Tool unit tests (tests/test_tools.py):
Agent integration test (tests/test_agent.py):
create_agent() returns a valid agentRun the AST guard to verify the generated project:
python -m guard check <component_name>-ops-agent/
If there are violations, fix them and re-run until all checks pass.
"Agent project generated at
<component_name>-ops-agent/. All guard checks pass.To run:
cd <component_name>-ops-agent && pip install -e '.[dev]' python agent.py # interactive mode python agent.py --once "check error rate" # single query python agent.py --diagnose --once "why is latency high?" # structured reportTo validate structure:
python -m guard check <component_name>-ops-agent/Want me to run the final structure validation? Run: 04-validate-structure"