| title | Architecture |
|---|---|
| description | Core architecture and runtime flow |
The system is based on a loop that runs at a fixed frequency of self.config.hertz. This loop looks for the most recent data from various sources, fuses the data into a prompt, sends that prompt to one or more LLMs, and then sends the LLM responses to virtual agents or physical robots.
Specific runtime flow:
- Input plugins collect sensor data (vision, audio, social media, etc.)
- The Fuser combines inputs into a prompt
- The LLM generates commands based on the prompt
- The ActionOrchestrator executes commands through actions
- Connectors map OM1 data/commands to external data buses and data distribution systems such as custom APIs,
ROS2,Zenoh, orCycloneDDS.
# /src/runtime/cortex.py
async def _run_cortex_loop(self) -> None:
while True:
await asyncio.sleep(1 / self.config.hertz)
await self._tick()
async def _tick(self) -> None:
finished_promises, _ = await self.action_orchestrator.flush_promises()
prompt = self.fuser.fuse(self.config.agent_inputs, finished_promises)
output = await self.config.cortex_llm.ask(prompt)
logging.debug("I'm thinking... ", output)
await self.action_orchestrator.promise(output.commands)