Agent Config
Agent configs are YAML files that define how an agent runs. They’re used by society run and society daemon.
Full schema
Section titled “Full schema”name: string # Required. Unique agent name.description: string # Optional. Human-readable description.port: integer # Optional. HTTP listen port (1-65535).handler: string # Required. One of: echo, greeter, exec.system_prompt: string # Optional. System prompt for agent identity/role.
backend: # Required when handler is "exec". command: string # Required. Executable name or path. args: [string] # Optional. Arguments prepended to each invocation. session_flag: string # Optional. Flag for session ID on first message. resume_flag: string # Optional. Flag for session ID on follow-up messages. system_prompt_flag: string # Optional. Flag to pass the system prompt. env: [string] # Optional. Environment variables (KEY=VALUE format).
skills: # Optional. Capabilities advertised in the agent card. - id: string name: string description: string # Optional.Handlers
Section titled “Handlers”Returns the input message unchanged.
name: echoport: 8001handler: echogreeter
Section titled “greeter”Prepends “Hello! You said: ” to each message.
name: greeterport: 8002handler: greeterRuns an external command for each message. The command receives the message text as an argument and its stdout becomes the response.
name: claudeport: 8003handler: execbackend: command: claude args: ["-p", "--output-format", "json"] session_flag: "--session-id" resume_flag: "--resume"Session continuity
Section titled “Session continuity”When session_flag and resume_flag are set, the exec handler maintains conversation state:
- First message in a thread: appends
<session_flag> <session-id> - Follow-up messages: appends
<resume_flag> <session-id>
The session ID is stored in ~/.society/threads/<thread-id>.json.
Output parsing
Section titled “Output parsing”The exec handler tries to parse stdout as {"result": "<text>"} (the JSON format Claude Code uses with --output-format json). If that fails, it uses raw stdout as the response text.
Examples
Section titled “Examples”Claude Code
Section titled “Claude Code”name: claudedescription: Claude Code agentport: 8003handler: execbackend: command: claude args: ["-p", "--output-format", "json"] session_flag: "--session-id" resume_flag: "--resume"skills: - id: code name: Code Assistant - id: general name: GeneralOllama
Section titled “Ollama”name: llamadescription: Local Llama via Ollamaport: 8010handler: execbackend: command: ollama args: ["run", "llama3.2"]Custom script
Section titled “Custom script”name: summarizerdescription: Document summarizerport: 8020handler: execbackend: command: python3 args: ["tools/summarize.py", "--model", "gpt-4o"] env: - OPENAI_API_KEY=sk-xxxskills: - id: summarize name: SummarizeSystem prompts
Section titled “System prompts”The system_prompt field gives an agent identity and role context. The prompt is passed to the backend CLI via system_prompt_flag.
name: code-reviewerport: 8005handler: execsystem_prompt: "You are a senior code reviewer. Be concise and focus on bugs and security issues."backend: command: claude args: ["-p", "--output-format", "json"] system_prompt_flag: "--system-prompt"Known defaults for system_prompt_flag (used when the field is omitted):
| CLI | Default flag |
|---|---|
claude | --system-prompt |
happy | --system-prompt |
goose | --system |
If your CLI doesn’t support system prompts, omit both fields.
Autonomous mode defaults
Section titled “Autonomous mode defaults”When society onboard --deep detects CLI tools on remote hosts, it assigns default arguments so agents can run unattended (nobody is there to approve prompts). These defaults are set in the registry entry’s args field:
| CLI | Default args |
|---|---|
claude | -p --output-format json --dangerously-skip-permissions |
codex | --quiet --full-auto |
aider | --yes-always |
droid | --auto high |
opencode | --quiet |
You can override these after onboarding by editing ~/.society/registry.json.
File location
Section titled “File location”The daemon discovers all *.yaml and *.yml files in the agents directory (default: agents/). Override with --agents <dir>.