Practical Guides
Examples
Practical examples for using Orchgentic to build autonomous and multi-agent AI systems.
Example 1 — Create an Agent
Create a New Agent
bash
orch create agent Bob
Expected Result
text
Created agent: agents/bob.yaml
List Agents
bash
orch list-agents
Run an Agent
bash
orch run Bob --debug
Example Prompt
text
Summarize the latest trends in Product Marketing.
Example Agent Configuration
yaml
agent:
id: bob
name: Bob
role: General Assistant
timezone: America/Chicago
locale: en-US
provider:
type: groq
model: llama-3.3-70b-versatile
capabilities:
- web.request
- datetime.local
- memory.search
- knowledge.search
tools:
- web.request
- datetime.local
- memory.search
- knowledge.search
reasoning:
planner: true
reflection: true
memory:
enabled: trueExample 2 — Create a Team
Create a Team
bash
orch create team ContentTeam
Expected Result
text
Created team: teams/contentteam.yaml
List Teams
bash
orch list-teams
Run a Team
bash
orch run-team ContentTeam --debug
Example Team Architecture
text
ManagerAgent
↓
ResearchAgent
↓
WriterAgent
↓
ReviewerAgent
↓
Final OutputExample Use Case
Prompt:
text
Create a technical blog post explaining autonomous AI orchestration platforms.
Expected orchestration behavior:
- ResearchAgent gathers information
- WriterAgent drafts content
- ReviewerAgent validates quality
- ManagerAgent assembles final output
Example 3 — Tool Runtime
Run a Tool Directly
bash
orch tool run datetime.local --agent Bob
Expected Output
text
timezone='America/Chicago' weekday='Saturday' time='08:48:28'
Example Web Request
text
Research the latest developments in Product Marketing automation.
The agent can dynamically invoke web.request during execution.
Example 4 — Delegation
Example Delegation Flow
text
ManagerAgent └── delegates research to ResearchAgent └── delegates writing to WriterAgent └── delegates validation to ReviewerAgent
This allows:
- Specialization
- Parallel reasoning
- Modular orchestration
Example 5 — Memory Retrieval
Search Memory
bash
orch memory search "Product Marketing"
Agents can retrieve:
- Prior conversations
- Prior outputs
- Runtime context
- Execution history
Example 6 — Semantic Knowledge
Ingest Knowledge
bash
orch knowledge ingest docs/
Search Knowledge
bash
orch knowledge search "product marketing trends"
Agents can use semantic retrieval during execution.
Example 7 — Scheduled Autonomous Agent
Heartbeat Trigger
yaml
trigger: type: heartbeat interval_seconds: 3600
Example behavior:
- Run every hour
- Gather research
- Generate summary
- Store results in memory
Example 8 — Webhook-Triggered Workflow
Example flow:
- External system sends webhook
- Orchgentic trigger receives event
- Orchestration pipeline executes automatically
Example use cases:
- Ticket triage
- Incident response
- Automated reporting
- Content generation
- AI workflow automation
Example 9 — Capability Preflight
Before execution, Orchgentic validates:
- Required tools
- Provider configuration
- Team references
- Orchestration dependencies
Example Failure
text
ERROR: Agent requires tool 'web.request' but it is not configured.
This prevents:
- Wasted LLM calls
- Orchestration failures
- Silent runtime degradation
Example 10 — Timezone-Aware Runtime
Example Agent Time Context
yaml
timezone: America/Chicago locale: en-US
Example Tool
bash
orch tool run datetime.local --agent Bob
Returns:
- Localized time
- Timezone
- Weekday
- UTC offset
This enables:
- Scheduled workflows
- Region-aware orchestration
- Cloud-safe execution
Example 11 — Long-Running Research Workflow
Example Scenario
text
Research current Product Marketing strategies and create an executive summary.
Potential Orchestration Flow
text
ManagerAgent
↓
ResearchAgent
↓
Knowledge Retrieval
↓
WriterAgent
↓
ReviewerAgent
↓
Final SummaryFeatures involved:
- Web research
- Semantic retrieval
- Memory
- Delegation
- Orchestration
- Reflection
Example 12 — Autonomous Reporting System
Goal: Generate daily Product Marketing reports automatically.
Workflow:
- Heartbeat trigger fires
- Research agents gather data
- Writer agent summarizes findings
- Reviewer validates output
- Report stored to filesystem
- Future notification system distributes report
Example 13 — Future Workflow DAG Engine
Planned future orchestration:
text
START ↓ Research ↓ Branch: ├── Technical Summary ├── Executive Summary └── Social Content ↓ Review ↓ Publish
This will evolve into:
- Visual workflows
- Conditional routing
- Retries
- Persistent workflow state
Recommended Demo Flow
For first-time users:
bash
orch init orch create agent Bob orch list-agents orch run Bob --debug orch tool run datetime.local --agent Bob orch create team ContentTeam orch list-teams orch run-team ContentTeam --debug
This demonstrates:
- Runtime initialization
- Agent creation
- Team creation
- Tool runtime
- Provider integration
- Orchestration
- Delegation
- Team execution
Current Focus
The current Orchgentic release is focused on:
- Runtime stabilization
- Orchestration reliability
- Provider resilience
- Observability foundations
- Operational maturity
Developer Preview: v0.7.5-alpha