xml-pipeline/config/organism.yaml
dullfig a5e2ab22da Add thread registry, LLM router, console handler, and docs updates
Thread Registry:
- Root thread initialization at boot
- Thread chain tracking for message flow
- register_thread() for external message UUIDs

LLM Router:
- Multi-backend support with failover strategy
- Token bucket rate limiting per backend
- Async completion API with retries

Console Handler:
- Message-driven REPL (not separate async loop)
- ConsolePrompt/ConsoleInput payloads
- Handler returns None to disconnect

Boot System:
- System primitives module
- Boot message injected at startup
- Initializes root thread context

Documentation:
- Updated v2.1 docs for new architecture
- LLM router documentation
- Gap analysis cross-check

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 16:53:38 -08:00

73 lines
2.3 KiB
YAML

# organism.yaml — Multi-agent organism with console interface
#
# Message flow:
# boot
# -> system.boot (logs, sends ConsolePrompt)
# -> console (displays, awaits input, returns ConsoleInput)
# -> console-router (ConsoleInput -> Greeting)
# -> greeter (Greeting -> GreetingResponse)
# -> shouter (GreetingResponse -> ShoutedResponse)
# -> response-handler (ShoutedResponse -> ConsolePrompt)
# -> console (displays, awaits input, ...)
#
# The console is a regular handler in the message flow.
# Returns None on EOF/quit to disconnect.
organism:
name: hello-world
port: 8765
# Concurrency settings
max_concurrent_pipelines: 50
max_concurrent_handlers: 20
max_concurrent_per_agent: 5
# Thread scheduling: breadth-first or depth-first
thread_scheduling: breadth-first
# LLM configuration
llm:
strategy: failover
retries: 3
backends:
- provider: xai
api_key_env: XAI_API_KEY
rate_limit_tpm: 100000
listeners:
# Console: receives ConsolePrompt, displays output, awaits input
# Returns ConsoleInput to console-router, or None to disconnect
- name: console
payload_class: handlers.console.ConsolePrompt
handler: handlers.console.handle_console_prompt
description: Interactive console - displays output, awaits input
agent: false
# Console router: receives ConsoleInput, translates to target payload
- name: console-router
payload_class: handlers.console.ConsoleInput
handler: handlers.console.handle_console_input
description: Routes console input to appropriate listeners
agent: false
# Response handler: receives ShoutedResponse, creates ConsolePrompt
- name: response-handler
payload_class: handlers.console.ShoutedResponse
handler: handlers.console.handle_shouted_response
description: Forwards responses back to console
agent: false
# Greeter: receives Greeting, sends GreetingResponse to shouter
- name: greeter
payload_class: handlers.hello.Greeting
handler: handlers.hello.handle_greeting
description: Receives greeting, forwards to shouter
agent: true
peers: [shouter]
# Shouter: receives GreetingResponse, sends ShoutedResponse back
- name: shouter
payload_class: handlers.hello.GreetingResponse
handler: handlers.hello.handle_shout
description: Shouts the greeting in ALL CAPS
agent: false