Skip to content

timotius-devin/oaas

Repository files navigation

Overthinking-as-a-Service

An unnecessarily sophisticated AI system for tiny life decisions.

Submit a small decision you're overthinking (e.g., "Should I buy bubble tea tonight?") and watch a multi-agent AI system over-analyse it from every angle before delivering a funny but actionable verdict.

Why this exists

A personal portfolio project demonstrating advanced agentic architecture — LangGraph orchestration, multi-agent workflows, MCP tool integration, streaming trace UI, per-agent token/cost tracking, schema-enforced JSON outputs, persistent memory, and observability — all wrapped in a silly, memorable product.

Architecture

Streamlit UI
    ↓
Decision Submission
    ↓
LangGraph Workflow
    ├── Planner Agent (classifies decision, routes agents & tools)
    ├── Memory MCP (retrieves similar past decisions)
    ├── Calendar MCP (read-only Google Calendar density check)
    ├── Weather MCP (Open-Meteo friction assessment)
    ├── Emotional Agent
    ├── Social Battery Agent
    ├── Willingness-to-Spend Agent
    ├── Future Regret Agent
    ├── Existential Agent
    ├── Practical Adult Agent
    ├── Debate Agent (synthesis)
    ├── Reflection Agent (self-critique)
    ├── Verdict Agent (final answer)
    └── SQLite Memory Store

Key components

Component Tech
UI Streamlit
Orchestration LangGraph
LLM Framework LangChain
MCP Integration mcp Python SDK + langchain-mcp-adapters
Database SQLite via SQLAlchemy
Validation Pydantic
Observability Token counting, per-agent cost, streaming trace UI
Testing pytest
LLM Providers OpenAI, Anthropic, Ollama, Datasaur
Observability Token counting, per-agent cost, streaming trace UI

Setup

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Running

./run.sh

On first run, run.sh automatically bootstraps .env from .env.example (if missing) and exits — edit .env with your API keys, then re-run.

Subcommands

Command Behaviour
./run.sh or ./run.sh all Start 3 MCP servers (ports 8001–8003) + Streamlit UI. Ctrl+C stops everything.
./run.sh be Start MCP servers only.
./run.sh fe Start Streamlit frontend only.
./run.sh stop Kill all running MCP servers.

LLM Providers

Set LLM_PROVIDER in .env to one of: openai, anthropic, ollama, datasaur. Each provider needs the corresponding API keys configured in .env.

The LLM provider can also be switched at runtime via the sidebar selector in the Streamlit UI — the setting flows through the LangGraph state so every agent uses the same provider.

Google Calendar (optional)

  1. Go to Google Cloud Console
  2. Create a project and enable the Google Calendar API
  3. Create OAuth 2.0 credentials (Desktop application)
  4. Download credentials JSON to credentials/google_calendar_credentials.json
  5. On first use, a browser OAuth flow will save a token to credentials/google_calendar_token.json

Calendar access is read-only (calendar.readonly scope). No events are ever created, edited, or deleted.

Tests

pytest

46 unit tests covering input validation, output schemas, LLM provider switching, JSON extraction, repository CRUD, and tool helpers.

Project structure

.
├── run.sh                   # Unified launcher (MCP servers + Streamlit)
├── app.py                   # Streamlit entrypoint
├── agents/                  # One file per LangGraph agent node
├── graph/workflow.py        # LangGraph graph definition
├── llm/                     # LLM provider interface + implementations
├── mcp_servers/             # MCP server implementations (calendar, weather, memory)
├── mcp_client/              # MCP client loading and tool registry
├── tools/                   # Underlying tool logic
├── memory/                  # SQLAlchemy models + repository
├── schemas/                 # Pydantic models (inputs, outputs, state)
├── prompts/                 # Prompt templates per agent (.md)
├── observability/           # Agent tracing, token tracking, cost calculation
├── data/                    # SQLite database files
├── credentials/             # Google Calendar OAuth credentials
└── tests/                   # Unit, integration, and agent tests

Privacy

  • Runs entirely locally (if you use Ollama).
  • No authentication required.
  • No data sent to any server (except the LLM API you configure).
  • Google Calendar is read-only.
  • No bank, spending, or payment access.

Limitations

  • NOT a substitute for professional advice (medical, legal, financial).
  • Calendar integration requires Google Cloud setup.
  • Weather queries use Open-Meteo (no API key needed).
  • Agent quality depends on the LLM provider and model chosen.

Future ideas

  • Local model mode via Ollama
  • Outcome review reminders
  • Markdown export
  • Graph visualization
  • Voice input
  • Different personality modes

About

OaaS — An unnecessarily sophisticated AI system for tiny life decisions. LangGraph + 9 agents + MCP tools + streaming trace UI with token/cost tracking.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors