← Code Exchange

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.


⚠️ Community Contributed Project

This project was generously donated by one of our fabulous Temporal community members! We encourage you to check it out, but urge caution as Temporal does not formally support or endorse this project.

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.

5-minute setup & demo

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 Agent is 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. ActivityToolConfig for fast, synchronous calls; WorkflowToolConfig for long, durable, multi-step ones (search - hybrid RAG, txt2sql, list-models).
  • HITL is a Temporal Signal. self.interrupt() emits HITL_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#

list-models
steps
popover
sources

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)


Language

Python
💖 Community

About the Author

Anton Suharev

Anton Suharev