How ilgsupreme/orin works
Orin connects user requests to a persistent Cortex agent workflow: ingress becomes agent work, which may use inference and discovered backends, while goals and observations persist in Memory and results return through polling or the terminal client. Separate services provide model execution, Kubernetes discovery and administration, and signed Federation work exchange. Common protocols and job management form an internal runtime layer. Several links reflect README-described behavior because the corresponding implementation was not sampled; unsampled deployment and Federation details are represented conservatively.
Main entry points: cortex/app.py Cortex API · agent.py Agent runtime · llm/app.py LLM service · federation/app.py Federation API
Components 26
Cortex assistant
- Cortex API
src/cortex/app.py - Agent runtime
src/cortex/cortex/agent.py - Goals and memory
src/cortex/cortex/goal_store.py - Agent actions
src/cortex/cortex/actions.py - Admin commands
src/cortex/cli/command_router.py
Inference and runtime
- Inference routing
src/cortex/cortex/inference.py - Backend router
src/cortex/router/service.py - Primer model runtime
src/common/primer.py - LLM service
src/llm/app.py - LLM execution
src/llm/runtime.py - Work protocols
src/common/protocol/routing_types.py - Job manager
src/common/jobs.py
Cluster services
- Backend discovery
src/cortex/cluster/discovery/services.py - Backend client
src/cortex/cluster/discovery/client.py - Kubernetes deployment
src/cortex/cluster/deployment/service.py
Memory persistence
- Memory service
src/memory/app.py - Memory runtime
src/memory/runtime.py - SQL persistence
src/memory/sql.py
Federation
- Federation API
src/federation/app.py - Cortex bridge
src/federation/cortex_bridge.py - Federation identity and policy
src/federation/identity.py - Federation storage
src/federation/storage.py
Other components
- User
- Terminal client
terminal-chat.py - Federation peer
- Kubernetes cluster
Connections 31
- User → Terminal client: submits requests
README.md - Terminal client → Cortex API: sends chat
README.md - User → Cortex API: submits chat
README.md - Cortex API → Agent runtime: dispatches turns
src/cortex/app.py - Agent runtime → Inference routing: requests inference
README.md - Agent runtime → Goals and memory: persists goals
README.md - Agent runtime → Agent actions: runs actions
README.md - Agent runtime → Backend router: submits backend work
- Terminal client → Cortex API: polls goals
README.md - Cortex API → Admin commands: routes commands
src/cortex/app.py - Admin commands → Kubernetes deployment: administers cluster
src/cortex/cli/command_router.py - Kubernetes deployment → Kubernetes cluster: manages workloads
src/cortex/cluster/deployment/service.py - Inference routing → Primer model runtime: runs local inference
README.md - Inference routing → Backend router: selects backend work
- Backend router → Backend discovery: selects backends
src/cortex/router/service.py - Backend router → Backend client: submits work
src/cortex/router/service.py - Backend client → LLM service: sends work packets
README.md - LLM service → LLM execution: dispatches work
src/llm/app.py - LLM execution → Primer model runtime: generates output
src/llm/runtime.py - Cortex API → Work protocols: accepts work packets
src/cortex/app.py - LLM service → Work protocols: accepts work packets
src/llm/app.py - LLM service → Job manager: starts jobs
src/llm/app.py - Memory service → Memory runtime: dispatches requests
src/memory/app.py - Memory runtime → SQL persistence: reads and writes
src/memory/runtime.py - Goals and memory → Memory service: persists state
- Federation API → Cortex bridge: submits accepted work
src/federation/app.py - Federation API → Federation identity and policy: checks signatures
src/federation/app.py - Federation API → Federation storage: stores records
src/federation/app.py - Cortex bridge → Cortex API: submits work
README.md - Federation storage → Memory service: stores federation records
src/federation/storage.py - Federation peer → Federation API: exchanges work
README.md