Architecture
Unity’s intelligence is distributed across specialized state managers, each owning a different aspect of the assistant’s cognition:ask (read-only), update (mutations), and sometimes execute (start durable work). The Actor orchestrates them through code-first plans.
English as API
The defining design choice: managers communicate through natural-language interfaces. The public methods take plaintext: str parameters, not structured queries.
- Managers are swappable. The ContactManager could use a SQL database, a vector store, or an external CRM. The caller’s code doesn’t change.
- The system is inspectable. You can read the Actor’s plan and understand what it’s doing without reading implementation code.
- Composition is natural. The Actor can write
for contact in contacts: await primitives.knowledge.ask(f"What was {contact} working on?")— the English flows through cleanly.
Base class contracts
Every manager has an abstract base class (base.py) that defines the public API contract. The docstrings on these abstract methods are the API — they’re attached to derived classes via @functools.wraps and visible to the LLM when the methods are exposed as tools.
Each manager runs its own LLM
This is important: when the Actor callsprimitives.contacts.ask(...), the ContactManager starts its own async LLM tool loop. That loop has its own system prompt, its own set of internal tools (search contacts, filter by field, etc.), and its own conversation context.
This means:
- The Actor’s LLM doesn’t need to know how contacts are stored
- The ContactManager’s LLM is specialized for contact operations
- Each manager can use a different model if needed (fast model for simple lookups, powerful model for complex reasoning)
- The loops are independently steerable via their handles
Manager inventory
| Manager | ask | update | execute | What it owns |
|---|---|---|---|---|
| ContactManager | Who people are, relationships, contact details | Create, edit, delete, merge contacts | — | People |
| KnowledgeManager | Domain facts, structured knowledge | Create, change facts; refactor schemas | — | What the assistant knows |
| TaskScheduler | Task status, queue state | Create, edit, reorder tasks | Start tasks (returns live handle) | What the assistant needs to do |
| TranscriptManager | Conversation history, search, analysis | — | — | What was said |
| GuidanceManager | Procedures, SOPs, strategies | Add, edit, delete guidance | — | How to do things |
| FileManager | File metadata, parsing, content questions | — | — | Received files |
| WebSearcher | Web search, crawl, extract | — | — | The public internet |
| SecretManager | Secret metadata (not values) | Store, edit, delete secrets | — | API keys, tokens |
| MemoryManager | — | — | — | Offline consolidation (not interactive) |
Where to start reading
| File | What’s there |
|---|---|
unity/contact_manager/base.py | Example base class contract |
unity/common/state_managers.py | BaseStateManager with caller context injection |
unity/actor/environments/state_managers.py | How primitives are assembled |
unity/function_manager/primitives/registry.py | The typed Primitives API surface |
