원클릭으로
add-workflow
Scaffold a new Agno workflow with Steps, Loops, and Conditions, register in main.py, and create docs page
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Scaffold a new Agno workflow with Steps, Loops, and Conditions, register in main.py, and create docs page
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Scaffold eval test cases for an agent in backend/evals/test_cases.py, following the TestCase dataclass pattern used by DATA_AGENT_CASES, KNOWLEDGE_AGENT_CASES, and WEB_SEARCH_CASES
Verify all project documentation reflects current codebase state after feature changes
Scaffold a new Agno agent with boilerplate, register in main.py, and add config.yaml entry
Scaffold a new Agno multi-agent team with boilerplate, register in main.py, and create docs page
Scaffold a new mise task with correct headers, flags, and conventions
Pre-release validation checklist — verify versions, CI, docs, and Docker before running mise run release
| name | add-workflow |
| description | Scaffold a new Agno workflow with Steps, Loops, and Conditions, register in main.py, and create docs page |
| disable-model-invocation | true |
Create a new Agno workflow and integrate it into Apollos AI.
Ask the user for:
Create backend/workflows/{id_with_underscores}.py following this pattern:
"""
{Workflow Name}
{'-' * len(name)}
{Description}.
Uses Agno's Loop + Condition primitives for iterative refinement.
"""
from typing import List
from agno.agent import Agent
from agno.guardrails import PIIDetectionGuardrail, PromptInjectionGuardrail
from agno.workflow import Workflow
from agno.workflow.condition import Condition
from agno.workflow.loop import Loop
from agno.workflow.step import Step
from agno.workflow.types import StepInput, StepOutput
from backend.agents.{agent_module} import {agent_name}
from backend.db import get_postgres_db
from backend.models import get_model
# Inline Agents (ephemeral, no DB persistence needed)
# Guardrails included per project convention.
inline_agent = Agent(
name="{Inline Agent}",
role="{role}",
model=get_model(),
instructions=[...],
pre_hooks=[PIIDetectionGuardrail(mask_pii=False), PromptInjectionGuardrail()],
markdown=True,
)
# Loop End Condition
def quality_met(outputs: List[StepOutput]) -> bool:
"""Return True to break the loop when quality is sufficient."""
if not outputs:
return False
for output in outputs:
content = str(output.content or "")
if "QUALITY_PASS" in content:
return True
return False
# Condition Evaluator
def should_branch(step_input: StepInput) -> bool:
"""Check the original user input (not accumulated content) for routing."""
text = str(step_input.input or "").lower()
return any(signal in text for signal in ["compare", "analyze", "evaluate"])
# Workflow
{variable_name} = Workflow(
id="{workflow-id}",
name="{Workflow Name}",
description="{description}",
db=get_postgres_db(),
add_workflow_history_to_steps=True,
steps=[
Step(
name="Step 1",
description="...",
agent={agent_name},
max_retries=2,
),
Loop(
name="Refinement Loop",
description="Iterate until quality threshold met.",
max_iterations=3,
end_condition=quality_met,
steps=[
Step(name="Review", agent=inline_agent, add_workflow_history=True),
Step(name="Refine", agent={agent_name}, add_workflow_history=True, skip_on_failure=True),
],
),
Condition(
name="Routing",
description="Branch based on input complexity.",
evaluator=should_branch,
steps=[Step(name="Branch A", agent={agent_name}, add_workflow_history=True)],
else_steps=[Step(name="Branch B", agent={agent_name}, add_workflow_history=True)],
),
],
)
Key conventions:
pre_hooks)end_condition receives List[StepOutput], returns True to breakevaluator receives StepInput, returns True for primary pathstep_input.input (user query), NOT previous_step_content (accumulated output causes false positives)add_workflow_history_to_steps=True on the Workflowagent, max_retries, skip_on_failure, add_workflow_history (no instructions or timeout_seconds)Add the import and include in the workflows list:
from backend.workflows.{module_name} import {variable_name}
agent_os = AgentOS(
workflows=[research_workflow, {variable_name}],
...
)
Add a quick-prompts entry in backend/config.yaml for the new workflow.
Create docs/workflows/{id}.mdx with frontmatter, code example, step table, and primitives reference.
Add the page to docs/docs.json navigation under the Workflows group.
Update these files to reflect the new workflow:
README.md — Workflows tablePROJECT_INDEX.md — Workflows section and core modules.serena/memories/project-overview.md — Workflows listdocs/agents/overview.mdx — Workflows tableTell the user:
backend/workflows/{name}.pybackend/main.pybackend/config.yamldocs/workflows/{id}.mdxmise run docker:up or docker compose restart