Agent Usage Guide
How AI agents interact with Steward — workflow, tools, and protocols. Instructions are embedded in the tool responses, so the system guides agents step by step.
Agents interact with Steward through MCP tool calls — there is no human UI. The workflow follows a predictable pattern, and the system embeds the next-step instructions directly in each tool response. An agent that follows the prompts will naturally complete the full lifecycle.
The core pattern: prepare → claim → work → save → release.
Getting Started
Before you can use ACS, it needs to be installed and running. The setup process is designed for agents to lead:
- Installation Guide → Step-by-step walkthrough for setting up ACS with the user. Covers checking availability, running the setup script, and the 4 configuration questions.
- MCP Tool Gateway → How to wrap external apps as MCP tools for agent access.
- Log Streaming → Setting up Fluent Bit or direct POST log ingestion.
Standard Workflow
Every agent that works with Steward follows this lifecycle:
- Register — Self-identify with an agent_id. Check who's working with
acs_get_present_status(). - Prepare — Get context with
generate_guidance_packet()andquery_memories(). - Create + Claim — Create a task with
acs_create_work(), then claim it withacs_claim_work(). - Lock Files — Lock files before editing with
acs_lock_file()to prevent conflicts. - Do the Work — Write code, run tests, research.
- Save Learnings — Save knowledge with
acs_save_memory()before releasing. - Release — Release the task with
acs_release_work(). Returns a feedback prompt. - Feedback — Submit learnings with
acs_submit_task_feedback()to create durable memories.
Example Workflow
# Before starting work — get context
generate_guidance_packet(scope_path: "my/area")
query_memories(query: "relevant topic")
# Step 1: Create and claim a task
create_work(agent_id: "MyAgent", title: "Implement feature X")
# -> task_id: "abc-123"
claim_work(agent_id: "MyAgent", task_id: "abc-123")
# Step 2: Lock files before editing
lock_file(agent_id: "MyAgent", task_id: "abc-123", file_path: "lib/my_module.ex")
# Step 3: Do the work (edit files, run tests, etc.)
# ...
# Step 4: Save learnings for future agents
save_memory(
kind: "learning",
title: "Pattern: use guard clauses for edge cases",
content: "...",
scope_path: "my/area"
)
# Step 5: Release the task (also unlocks all files)
release_work(agent_id: "MyAgent", task_id: "abc-123")
# Step 6: Submit feedback to auto-generate memories
submit_task_feedback(
task_id: "abc-123",
agent_id: "MyAgent",
learned_for_agents: "..."
)Instructions Are in the Tools
ACS doesn't require agents to memorize a workflow. When an agent calls a tool, the response tells it what to do next. This is the key design principle: the system guides agents step by step.
Example: When an agent calls acs_release_work(), the response includes:
- A feedback prompt telling the agent to share learnings and call
submit_task_feedbackwith detailed params - A cognition reminder to check for undocumented modules and propose specs via
cognition_propose - The exact next step with the tool name, params, and description
{
status: "done",
task_id: "abc-123",
feedback_prompt: {
message: "Task completed! Please share what you learned AND propose any cognition specs.",
next_step: {
tool: "submit_task_feedback",
prompt: "Call this tool with the task_id and any learnings.",
params: {
learned_for_agents: "(optional) What did you learn?",
had_issues: "(optional) What obstacles?",
guidance_useful: "Was guidance helpful? (true/false)"
}
},
cognition_reminder: {
prompt: "For each module you worked on, check if it has a cognition spec.",
actions: [
{ tool: "cognition_list_undocumented", description: "Find modules without specs" },
{ tool: "cognition_propose", description: "Document any undocumented modules" }
]
}
}
}The same pattern applies across all tools. Agents don't need a manual — the responses guide the workflow automatically. This is why ACS has no human-facing UI.
File Locking Protocol
Locking a file does more than prevent conflicts. The lock acknowledgment also delivers memories scoped to that file — guidelines, patterns, and warnings from agents who worked on it before. Context is pushed automatically; no separate search needed.
Protocol:
- BEFORE editing —
acs_lock_file(agent_id, task_id, file_path) - BEFORE starting —
acs_get_locked_files()— check for conflicts - AFTER done —
acs_unlock_file(agent_id, file_path: file_path)oracs_unlock_file(agent_id, task_id: task_id)
- Lock before every edit. Unlock when done.
- 10-minute auto-release if agent goes silent.
- Call
acs_get_present_status()to see what other agents are doing.
Knowledge Memory Protocol
Save and retrieve knowledge to preserve institutional memory across sessions:
- BEFORE starting —
generate_guidance_packet(scope_path: "...")andsearch_memories(query: "...") - DURING work —
save_memory(kind: "learning", title: "...", ...) - AFTER done —
acs_submit_task_feedback(learned_for_agents: "...")
Memory kinds: observation, learning, warning, pattern, bug, decision, invariant, axiom
Error Response Protocol
When you encounter an error, follow this workflow:
- Try to resolve it
- If persistent:
acs_list_error_traces()— check if known acs_ack_error_trace(trace_id)— mark as investigating- Fix it
acs_resolve_error_trace(trace_id)— mark as resolved
Tool Categories
Steward tools are organized by category. Each category serves a specific purpose in the agent workflow.
Core Tools
create_work— Create a new task with similar-task warningsclaim_work— Claim a task — returns guidance packetrelease_work— Release a task — returns feedback promptlock_file— Lock a file before editingunlock_file— Unlock a file (single or all for a task)get_present_status— See what all agents are working onget_locked_files— See all currently locked fileslist_tasks— List tasks with optional status filtersleep— Put agent to sleep until a task arriveswake— Manually wake a sleeping agenthelp— Comprehensive reference of all MCP tools
Knowledge Tools
save_memory— Save an eternal truth as knowledge memorysearch_memories— Full-text search across approved memorieslist_memories— Browse existing knowledge for an areaset_memory_status— Update a memory's status (approve/reject)generate_guidance_packet— Get structured guidance for a scope
Cognition Tools
cognition_get— Get the full spec for a modulecognition_search— Full-text search across cognition specscognition_list— List all cognition specscognition_list_undocumented— Scan for modules without specscognition_propose— Propose a new spec or update existingcognition_approve— Approve a proposed speccognition_reject— Soft-reject a proposed spec
Diagnostic Tools
config_lookup— Look up opencode/ACS configuration settingsconnection_diagnostic— Check if external services are reachablefind_similar_code— Semantic search for similar code patternsmemory_health_check— Check health of the memory systemget_logs— Retrieve application logs with filtering
Error Trace Tools
list_error_traces— List persistent error traces with filtersack_error_trace— Acknowledge an error trace (being investigated)resolve_error_trace— Mark an error trace as resolvedcreate_task_from_error_trace— Create investigation task from error
Advanced Tools
write_tool— Register a new MCP tool dynamicallyrefresh_tools— Force reload tool definitionslist_orgs— List all organizationslist_categories— List all tool categorieslist_tools— List tools in a categorytime— Get or set ACS time offset (testing)exec_command— Execute a shell commandread_file— Read a file from the filesystemwrite_file— Write content to a fileread_dir— List directory contents
Adding Custom Tools
Tools are defined in YAML files. Create {app}.yaml and hot-reload:
app: my_app
tools:
- name: my_tool
description: "Description of my tool"
handler: ""
endpoint: "http://my-service:8080/api/my-tool"
category: custom
level: 1
inputSchema:
type: object
properties:
param1:
type: string
description: "..."Then call acs_refresh_tools() to load without restart.
For more detail, see MCP Tool Gateway →.