How incidentfox/self-learning-ai-agent works
This is a multi-service team knowledge assistant. Users ask questions through Slack or the web UI; the agent API routes knowledge queries to the learning engine, whose retrieval layer combines strategies and returns evidence for an answer. The parallel learning loop ingests conversations, documents, and connected sources, analyzes and reconciles knowledge, then stores accepted items or queues uncertain ones for review. The README documents onboarding, daily learning, proactive behaviors, integrations, and administration. Some subsystem links rely on README-level documentation because their implementation was not sampled.
Main entry points: agent-service/server.py Agent API · teaching.py Knowledge teaching · learning-engine/server.py Learning API · app.py Slack bot
Components 21
User interfaces
- Slack bot
slack-bot/app.py - Web dashboard
web-ui/src/app
API and control plane
- Agent API
agent-service/server.py - Agent runs
agent-service/runs.py - Configuration API
config-service/src/api/main.py - Config database
config-service/src/db/database.py
Learning and knowledge
- Learning API
learning-engine/server.py - RAG retrieval
learning-engine/retrieval/retriever.py - Retrieval strategies
learning-engine/retrieval/strategies.py - Knowledge teaching
learning-engine/agents/teaching.py - LLM services
learning-engine/core/llm.py - RAPTOR trees
learning-engine/pipeline/tree_builder_pipeline.py - Knowledge store
learning-engine/core/db.py
Ingestion sources
- Document ingestion
learning-engine/pipeline/doc_ingestion.py - Integration sync
learning-engine/connectors/manager.py - Source connectors
learning-engine/connectors
Proactive and meetings
- Proactive agents
learning-engine/agents/proactive.py - Meeting processing
meeting-bot/server.py
Other components
- Slack users
- Web users
- Team sources
Connections 22
- Slack users → Slack bot: ask or teach
README.md - Web users → Web dashboard: ask or manage
README.md - Slack bot → Agent API: chat requests
README.md - Web dashboard → Agent API: chat requests
README.md - Agent API → Agent runs: creates runs
agent-service/server.py - Agent API → Learning API: queries knowledge
agent-service/server.py - Learning API → RAG retrieval: dispatches search
learning-engine/server.py - RAG retrieval → Retrieval strategies: runs strategies
learning-engine/retrieval/retriever.py - Learning API → Knowledge teaching: submits teaching
learning-engine/server.py - Document ingestion → Knowledge teaching: teaches chunks
learning-engine/pipeline/doc_ingestion.py - Integration sync → Source connectors: dispatches sync
learning-engine/connectors/manager.py - Source connectors → Knowledge teaching: supplies documents
learning-engine/connectors/manager.py - Knowledge teaching → LLM services: embeds content
learning-engine/agents/teaching.py - Knowledge teaching → Knowledge store: persists knowledge
learning-engine/agents/teaching.py - RAPTOR trees → Knowledge store: reads and updates
learning-engine/pipeline/tree_builder_pipeline.py - Proactive agents → RAG retrieval: retrieves context
learning-engine/agents/proactive.py - Proactive agents → LLM services: generates summaries
learning-engine/agents/proactive.py - Meeting processing → Learning API: submits transcripts
README.md - Team sources → Integration sync: provides content
README.md - Configuration API → Config database: reads and writes
config-service/src/api/main.py - Slack bot → Configuration API: loads workspace config
README.md - Agent API → Config database: shares database
README.md