SparkGen Agent
Manage agents defined in config/ai_workflow.yaml.
Dynamic Context
Before any action:
- •Read
config/ai_workflow.yaml— parse theagents:section to get current agent list - •List prompt files:
ls prompts/ - •List context files:
ls contexts/ - •List guardrail agent overrides:
ls guardrails/agents/ 2>/dev/null
Actions
List Agents (/sparkgen-agent list)
Parse config/ai_workflow.yaml and display a table:
| Name | Role | Tools | RAG Mode | Guardrail Sets |
For each agent, show its key configuration.
Show Agent (/sparkgen-agent show <name>)
Display full agent config from workflow YAML including:
- •Role and description
- •Tools assigned
- •Prompt file + context files + variables
- •Guardrail sets
- •RAG config (mode, knowledge bases, top_k)
- •Handoff rules (from
handoffs:section)
Add Agent (/sparkgen-agent add <name>)
Create all required files for a new agent:
- •Prompt file: Create
prompts/<name>.mdwith a system prompt template - •Context file (optional): Create
contexts/<name>_guidelines.mdif the agent needs specific context - •Guardrail override (optional): Create
guardrails/agents/<name>.mdfor agent-specific rules - •Workflow entry: Add agent config to
agents:section inconfig/ai_workflow.yaml:yaml- name: <name> role: "<role description>" description: "<what this agent does>" tools: [<tool_list>] prompt: prompt_file: prompts/<name>.md context_files: [contexts/platform_context.md] variables: agent_name: "<Name>" prompt_suffix: "" rag_context_template: "" guardrails: use_sets: [platform_defaults] rag: enabled: false mode: standard knowledge_bases: [] inject_context: false - •Handoff rule: Add entry to
handoffs:section:yaml- from: main_agent to: <name> condition: "intent == '<name_intent>'"
- •Update orchestration: If pattern was
single_agent, switch torouter_manager - •Validate: Run
make validateto verify the workflow loads correctly
Modify Agent (/sparkgen-agent modify <name>)
- •Read current agent config from workflow YAML
- •Ask what to change (role, tools, prompt, guardrails, RAG config)
- •Update the workflow YAML and any related files
- •Run
make validate
Remove Agent (/sparkgen-agent remove <name>)
- •Remove agent entry from
agents:in workflow YAML - •Remove handoff rules referencing the agent from
handoffs: - •Optionally remove
prompts/<name>.mdandcontexts/<name>_guidelines.md - •If only one agent remains, switch orchestration pattern to
single_agent - •Run
make validate
Important Notes
- •The
main_agentis the entry point and should not be removed - •Agent names must be snake_case
- •Every agent needs at minimum: a prompt file and a workflow YAML entry