Developer

SpiritDAO: AI Agents (Developer Documentation)

Audience: developers and technical evaluators. This document describes the two distinct AI systems in the app, their models, and their RAG architecture.

Scope note: This is public-safe documentation. It describes architecture and model choices. It omits secret values (API keys, index credentials) and security-sensitive internals.

Model guidance: when building new AI features here, default to the latest Claude models. The model IDs below are current as of writing.


Two distinct systems

The app runs two separate AI systems. They share infrastructure (Anthropic Claude, OpenAI embeddings, Pinecone) but serve different audiences and live in different code paths.

Community AgentSensemaker
Audiencemembers, per podthe public
Jobgenerate forum/chat replies, daily prompts, event copyanswer Q&A about the DAO + philosophy
Codesrc/services/communityAgent/src/services/sensemaker/ + /api/sensemaker/chat

1. Community Agent

A per-pod agent that participates in a pod's spaces: it generates forum and chat replies, daily discussion prompts, and event descriptions. Each pod configures its own agent (persona, corpus, enablement).

Models (agentService.ts):

RAG (per-pod):

its own retrieval namespace (configService.ts defaults to agent-${podId}).

spiritdao-books index for philosophy grounding.

Config: per-pod settings live in the pod_modules table (see 05-data-model-and-rls.md). The Community Agent is the Paid module tier: a pod enables it via a 25 $SYSTEM / month subscription (on-chain verified, with pause/resume) through POST /api/community-agent/subscribe, separate from the community_agent_enabled toggle.

Files:


2. Sensemaker

A public-facing Q&A assistant (no sign-in required; rate-limited to 10/min, see 06-api-reference.md). It answers two kinds of questions and routes between them.

Routing (routingService.ts):

spiritdao (DAO-operations questions) or temporal-naturalism (philosophy).

Answering (responseService.ts):

RAG (pineconeService.ts):

Knowledge sources:

spiritdao-operations-guide.md, via npm run embed:spiritdao.

responseService.ts, so updating Sensemaker's DAO answers can mean updating both the embedded corpus and that system prompt.

Files:

Public Sensemaker chats are logged via an anonymous-insert path (see 05-data-model-and-rls.md).


Aside: the legacy standalone chatbot (being retired)

There is a separate, standalone Flask chatbot at src/sensemaker/spiritdao_chatbot/: OpenAI GPT, philosophy-only, hosted on PythonAnywhere, and historically embedded on the marketing website.

It is being retired in favor of embedding the in-app Sensemaker described above. It is documented here only so the duplication isn't mistaken for a second active system. New AI work should target the in-app Sensemaker / Community Agent (Claude), not this Flask app.


Where to go next