Open Council is a CLI-first, open-source multi-agent LLM orchestration tool designed to replicate Perplexity's "Council of Models." It utilizes a "Bring Your Own Key" (BYOK) hybrid model, mixing local offline models with cloud-based endpoints.
- Language: Python 3.11+
- Orchestration: LangGraph (State management, cyclic/acyclic routing)
- LLM Routing: LiteLLM (Universal API translation)
- Concurrency:
asyncio - CLI UI:
Rich(Live displays, progress spinners, markdown rendering)
- Async Everything: All network calls, file I/O, and LLM generations MUST be asynchronous (
async def,await). Never use blocking standard library calls (likerequests). Useaiohttporhttpxfor standard web requests. - The Semaphore Rule: Never make raw API calls directly from a LangGraph node. All LLM calls and Search calls MUST be routed through our
core/throttle.pywhich wraps them in anasyncio.Semaphoreto prevent 429 Rate Limits. - Graceful Fallbacks: The system must never crash on an LLM API failure. Use LiteLLM's built-in fallback array (Primary -> Secondary -> Local Ollama).
- No Raw Prints: Standard
print()statements will corrupt the async terminal UI. All CLI output must be routed through theRichconsole components defined insrc/open_council/ui/. - Type Hinting: Enforce strict Python typing (
typing.Dict,typing.List,typing.Annotated). LangGraph state relies entirely on accurateTypedDictandPydanticschemas.
- Nodes should be pure functions that take a
Statedict, perform an async action, and return a dictionary containing ONLY the keys they intend to update. - Do not mutate the state inside the node directly; let LangGraph handle the state merging.