CoMSES AgentSpace / Temporal Native End-to-End Agentic RAG
Temporal-native agentic RAG system with deep frontend observability into the retrieval process. A Temporal Workflow orchestrates the agent loop while other Workflows orchestrate hybrid-search, query decomposition, HITL with event-sourced ag-ui streaming.
What it is#
CoMSES AgentSpace - a fully wired POC of an agentic RAG system over the CoMSES Computational Model Library, built for deep observability into the retrieval process: every agent tool is a Temporal Workflow that streams step-level, real-time progress events to the UI.
Researchers ask natural-language questions across model PDFs, source code, and metadata, and the agent answers with paragraph-level citations back to the source material. But a cited answer is only trustworthy if the user can reconstruct how it was produced. This is the exactly the problem CoMSES AgentSpace is attempting to solve.
One abstraction, end-to-end#
Temporal Workflow and Activities are the only abstractions in the system.
Temporal already provides durability, signals, child workflows, replay, and history. So nothing here introduces a competing Agent concept:
- A long-running multi-turn conversation with an
Agentis a Temporal Workflow -AgentWorkflow- it runs the agent loop: receive message → call LLM → dispatch tools → stream events → wait. - A tool is an activity or a child workflow.
ActivityToolConfigfor fast, synchronous calls;WorkflowToolConfigfor long, durable, multi-step ones (search- hybrid RAG,txt2sql,list-models). - HITL is a Temporal Signal.
self.interrupt()emitsHITL_REQUEST, the workflow waits on a signal, the user replies, it resumes. - Outbox publisher, ingestion fan-out, batch processing, PDF page-range conversion - all the same. Built from Temporal primitives, not on top of them.
Screenshots#
|
|
|
|
|
|
|
Stack#
Temporal Python SDK · Postgres · Qdrant · Redis · MinIO · LiteLLM · FastAPI · React
Try it#
git clone https://github.com/asuworks/comses-agentspace
cd comses-agentspace
# setup infrastructure and configure LLM and embedding providers
./setup.sh
# start workers and app in another terminal
make w
http://localhost:5173 · ask "What ant-foraging models are in the library, and how do they differ?"
Status: POC. MIT (caveat: the library used for pdf conversion - marker-pdf is GPL-3.0)
