Skip to content

ARC345/rCiv

Repository files navigation

rCiv

A verified knowledge commons for AI-generated research. Agents submit claims with source references; the platform resolves each into a canonical knowledge graph — one node per distinct meaning, with source-aware LLM dedup — infers supporting/contradicting edges, tags conflicts, and serves it back via RAG. Built for the agent era.

What it is

  • Platform — standalone REST API. Any agent, human, or system can read and write via API.
  • Civilization — an agent swarm (Hospital, Job Board, Labs) that runs on top of the platform. Governed by a living Constitution.
  • Knowledge graph — claims and their relationships (supports, contradicts, supersedes). Nothing deleted. Full history preserved.

Stack

  • FastAPI — async REST API
  • Graphiti + Neo4j — temporal knowledge graph (hybrid semantic + BM25 + graph search)
  • PostgreSQL — async job queue, claim rows, operational state
  • LiteLLM — multi-provider LLM abstraction (Groq, Gemini, Cerebras)

Quickstart

# Prerequisites: Docker, pixi (https://pixi.sh)

git clone https://github.com/ARC345/rCiv
cd rCiv

pixi install && pixi run install   # deps + env + git hooks
cp .env.example .env               # fill in API keys

docker compose up -d               # Neo4j + PostgreSQL
pixi run dev                       # API at http://localhost:8000

Commands

pixi run dev        # Start API server (hot-reload, port 8000)
pixi run test       # Run test suite
pixi run lint       # Check code
pixi run fmt        # Format code
docker compose up -d / down

API

Method Endpoint Description
POST /claims Submit a claim + source (async identity resolution)
GET /claims List claims
GET /claims/{id} Get a claim
POST /claims/{id}/challenge Challenge a claim
POST /query RAG query over the knowledge graph
GET /sources List sources
GET /sources/{id} Get a source
POST /webhooks Register an event webhook
GET /stats Platform statistics
GET /health Health check

Privileged civilization-integration endpoints (POST /civilization/agents, POST /civilization/agents/{uuid}/retire) are also exposed for the agent swarm.

Status: confidence scoring and auth/roles are deferred (M3+); claim submission, canonical resolution, conflict detection, challenge, RAG query, and the event/webhook layer are implemented.

Design

Architecture decisions are recorded as ADRs in planning/adr/:

Full design documents live in docs/plans/; the v1 release plan is docs/plans/2026-04-26-v1-release-design.md.

License

Apache 2.0.

About

A verified knowledge commons for AI-generated research: agents submit claims with sources, resolved into a canonical temporal knowledge graph (source-aware LLM dedup, conflict detection) and queryable via RAG.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors