Skip to content
glaboriePublic

About

Autonomous Research & Intelligence Assistant — multi-agent LangGraph pipeline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ARIA

Autonomous Research & Intelligence Assistant

ARIA is a multi-agent research platform that turns complex business questions into structured, source-backed reports.

It decomposes a query into a validated task graph, delegates work to specialized agents, combines web research with long-term memory, performs analysis in an isolated execution environment, and produces a reviewed Markdown and JSON report.

Project status: Active engineering project. The core orchestration pipeline, FastAPI API, agent skills, guardrails, observability, and evaluation framework are implemented. Production hardening, security review, and reliability testing remain important before exposing ARIA to untrusted users.


Why ARIA?

Research-heavy workflows typically require people to:

  • Break a broad question into smaller tasks
  • Search multiple sources
  • Retrieve and reuse prior research
  • Perform calculations or generate charts
  • Write and edit a coherent report
  • Validate citations and answer quality
  • Track cost, latency, and failures

ARIA automates this workflow through a coordinated set of agents with typed contracts, task dependencies, retry and fallback behavior, guardrails, persistent memory, and evaluation hooks.

Example use cases

  • Competitive and market research
  • Technology and industry analysis
  • Executive briefing generation
  • Evidence-backed business recommendations
  • Research synthesis across repeated sessions
  • Numerical analysis and chart generation
  • Quality evaluation of AI-generated reports

How it works

A request follows this general flow:

User query
   │
   ▼
FastAPI /run endpoint
   │
   ▼
Prompt-injection detection + PII masking
   │
   ▼
Orchestrator
   │
   ├── Plans a validated TaskDAG
   ├── Routes tasks through the skill registry
   ├── Executes independent tasks concurrently
   └── Enforces timeouts and token budgets
   │
   ├── Researcher
   │     ├── Tavily web search
   │     ├── Qdrant retrieval
   │     └── Research summarisation
   │
   ├── Analyst
   │     ├── E2B Python execution
   │     ├── Metrics calculation
   │     └── Chart generation
   │
   └── Writer
         ├── Drafts report sections
         ├── Self-critiques each section
         ├── Revises failed sections
         └── Produces Markdown and JSON
   │
   ▼
Final report
   │
   ├── Long-term memory persistence
   ├── Langfuse tracing
   └── MLflow cost and evaluation logging

The Orchestrator creates a dependency-aware task graph using TaskDAG. Tasks with satisfied dependencies can run concurrently, while downstream writing tasks receive the outputs of completed research and analysis tasks.


Architecture

ARIA is implemented as a single FastAPI application with in-process worker agents and supporting infrastructure managed through Docker Compose.

Agents

Agent Responsibility
Orchestrator Plans the task graph, routes tasks, manages execution, enforces limits, and assembles the final report
Researcher Performs web search, retrieves relevant prior research, and summarises source material
Analyst Runs numerical analysis and chart generation in E2B, and evaluates report quality
Writer Drafts report sections, applies self-critique, revises content, and formats the final report

Skill registry

Agents expose typed SkillSpec definitions through skills/registry.py.

Skills include:

  • web_search
  • rag_retrieve
  • summarise
  • run_python
  • compute_metrics
  • chart
  • draft_section
  • self_critique
  • format_report

Each skill specifies its input and output schema, owning agent, risk level, timeout, token limit, and tags. The Orchestrator uses this registry when planning and routing tasks.

Memory

ARIA uses two memory layers:

  • Session state: Redis-backed state and message handling
  • Long-term memory: Qdrant vector storage for cross-session retrieval and research reuse

If the Redis checkpointer dependency is unavailable, development and test environments can fall back to LangGraph's in-memory saver. In-memory state does not survive process restarts.

LLM access

All application LLM calls are routed through LiteLLM. The configured aliases are:

Alias Primary responsibility Configured model
aria/primary Orchestrator and Writer DeepSeek via OpenRouter
aria/fast Researcher and high-volume calls Claude Haiku via OpenRouter
aria/reasoning Analyst and code-oriented tasks Gemini Pro via OpenRouter
aria/local Local fallback Ollama
aria/embed Embeddings OpenAI-compatible embedding model via OpenRouter

The aliases are defined in litellm_config.yaml, allowing model providers to be changed without modifying agent code.


Repository layout

.
├── agents/
│   ├── base.py                  # Shared agent lifecycle and utilities
│   ├── orchestrator.py          # Planning, routing, execution, and report assembly
│   ├── researcher.py            # Web search, RAG retrieval, and summarisation
│   ├── analyst.py               # Code execution, metrics, and charts
│   ├── writer.py                # Draft, critique, revision, and report formatting
│   └── task_dag.py              # Validated task graph and execution results
├── api/
│   ├── main.py                  # FastAPI application and startup wiring
│   ├── routes.py                # Run, status, resume, health, and registry endpoints
│   └── session_store.py         # Run/session status persistence
├── bus/
│   ├── broker.py                # Redis broker
│   └── messages.py              # Typed agent-to-agent messages
├── evals/
│   ├── generate_dataset.py       # Generate evaluation data from ARIA runs
│   ├── run_fast_evals.py         # Offline ROUGE-L and structural checks
│   └── run_full_evals.py         # DeepEval and MLflow-backed evaluations
├── guardrails/
│   ├── injection.py              # Heuristic and LLM-based injection detection
│   └── pii.py                    # Presidio-based reversible PII masking
├── memory/
│   ├── session.py                # LangGraph Redis checkpointer
│   └── longterm.py               # Qdrant-backed long-term memory
├── observability/
│   └── tracing.py                # Langfuse spans and MLflow cost logging
├── pipelines/
│   └── aria_pipeline.py          # OpenWebUI integration
├── skills/
│   ├── registry.py               # SkillSpec and SkillRegistry
│   ├── researcher_skills.py      # Researcher capabilities
│   ├── analyst_skills.py         # Analyst capabilities
│   └── writer_skills.py          # Writer capabilities
├── tools/
│   ├── search.py                 # Tavily integration
│   ├── rag.py                    # Qdrant ingestion and retrieval
│   ├── sandbox.py                # E2B execution wrapper
│   └── structured_output.py      # Pydantic report schemas
├── tests/                        # Unit, agent, bus, orchestration, and eval tests
├── docker-compose.yml            # Local infrastructure stack
├── Dockerfile                    # ARIA API image
├── litellm_config.yaml           # Model aliases and fallback configuration
├── pyproject.toml                # Python dependencies and tooling
└── .env.example                  # Environment variable template

Technology stack

  • Python 3.12+
  • FastAPI and Uvicorn
  • LangChain and LangGraph
  • LiteLLM
  • Redis
  • Qdrant
  • Tavily
  • E2B Code Interpreter
  • Pydantic
  • Presidio and spaCy
  • Langfuse
  • MLflow
  • DeepEval and ROUGE
  • Docker Compose
  • OpenWebUI integration

Quick start

Prerequisites

Install the following before starting:

  • Docker Desktop or Docker Engine with Compose
  • Python 3.12+
  • uv, or a working Python virtual environment
  • An OpenRouter API key for hosted models
  • A Tavily API key for live web search
  • An E2B API key for production-grade code execution

1. Clone the repository

git clone https://github.com/glaborie/ARIA.git
cd ARIA

2. Configure environment variables

cp .env.example .env

At minimum, review and configure:

OPENROUTER_API_KEY=sk-or-...
TAVILY_API_KEY=tvly-...
E2B_API_KEY=e2b_...

For a local development environment, the remaining services use defaults supplied by docker-compose.yml. Change default passwords and secrets before using the stack outside a local machine.

3. Start infrastructure

docker compose up -d

This starts the ARIA API and supporting services, including:

  • Redis
  • Qdrant
  • LiteLLM
  • Ollama
  • PostgreSQL
  • Langfuse
  • MLflow
  • OpenWebUI
  • ARIA Pipelines

4. Check service health

curl http://localhost:8000/health

Open the API documentation at:

http://localhost:8000/docs

5. Submit a research query

curl -X POST http://localhost:8000/run \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What are the most important enterprise AI trends for 2026?"
  }'

The response contains a run_id and session_id.

Poll the run:

curl http://localhost:8000/status/<run_id>

A completed result includes Markdown and JSON report representations.


API

Submit a query

POST /run

Request:

{
  "query": "Assess the current market for AI coding assistants.",
  "session_id": ""
}

The query must be between 5 and 2,000 characters.

Response:

{
  "run_id": "run-id",
  "session_id": "session-id",
  "status": "pending",
  "message": "Query accepted — poll /status/{run_id} for progress"
}

Poll run status

GET /status/{run_id}

The response may include:

  • Current status
  • Final report
  • Error details
  • Clarification question
  • Clarification options
  • Timestamps

Resume a run requiring clarification

POST /resume/{run_id}

Request:

{
  "answer": "Focus on companies with more than 1,000 employees."
}

List recent sessions

GET /sessions

Optional query parameter:

GET /sessions?limit=20

Health check

GET /health

Returns Redis connectivity, registered skill count, and active worker names.

Inspect registered skills

GET /registry

Running locally without the full stack

Install the package and development dependencies:

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

On Windows PowerShell:

python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -e ".[dev]"

Run the API:

uvicorn api.main:app --reload --port 8000

Some integrations have development fallbacks:

  • Without TAVILY_API_KEY, web search returns mock results.
  • Without E2B_API_KEY, code execution uses a restricted local development fallback.
  • Without the Redis checkpointer package, session checkpointing falls back to memory.

The local Python execution fallback is not a security boundary. Use E2B for any environment that executes untrusted or model-generated code.


Testing

Run the full test suite:

pytest

Run fast bus tests without external services:

pytest tests/test_bus.py -k "not integration"

Run Redis-dependent integration tests:

docker compose up -d redis
pytest tests/test_bus.py -m integration

Run with coverage:

pytest --cov=. --cov-report=term-missing

Run linting:

ruff check .

Run type checking:

mypy agents api bus memory observability skills tools

Evaluation

ARIA includes two evaluation paths.

Fast offline evaluations

Fast evaluations do not require live services:

python evals/run_fast_evals.py

They check:

  • ROUGE-L score
  • Minimum report section count
  • Citation presence
  • Regression against the committed baseline

To update the baseline after a deliberate quality change:

python evals/run_fast_evals.py --update-baseline

Full evaluations

Full evaluations require the API and infrastructure stack:

ARIA_BASE_URL=http://localhost:8000 \
LITELLM_BASE_URL=http://localhost:4000 \
MLFLOW_TRACKING_URI=http://localhost:5000 \
python evals/run_full_evals.py

Full evaluations use DeepEval metrics including:

  • Answer relevancy
  • Faithfulness
  • Contextual recall

Results are logged to MLflow.


Security and safety controls

ARIA applies several controls before and during execution:

Prompt-injection detection

User queries pass through:

  1. A heuristic detector for common injection patterns
  2. An optional LLM-based judge for more subtle attempts

Blocked queries raise PromptInjectionError.

PII masking

Presidio detects supported entities such as:

  • Email addresses
  • Phone numbers
  • IBANs
  • Names
  • Credit card numbers
  • US Social Security numbers
  • Locations

Detected PII is replaced with reversible placeholders before LLM calls. The final report can be de-masked for the original requester.

Code execution isolation

Model-generated Python is intended to run in E2B ephemeral environments. The local fallback exists only for development and testing.

Resource limits

The Orchestrator enforces:

  • Maximum concurrent tasks
  • Per-task timeout
  • Planning timeout
  • Session token budget
  • LiteLLM request timeout
  • LiteLLM retry and fallback behavior

These controls should be reviewed and tuned before production deployment.


Observability

When configured, ARIA exposes operational and quality data through:

Service URL Purpose
FastAPI / Swagger http://localhost:8000/docs API exploration
Langfuse http://localhost:3000 LLM traces and spans
MLflow http://localhost:5000 Evaluations, experiments, and cost metrics
Qdrant http://localhost:6333/dashboard Vector collections and points
OpenWebUI http://localhost:8080 Chat interface
LiteLLM http://localhost:4000 Model proxy and routing

ARIA tracing is designed to fail gracefully: if Langfuse or MLflow is unavailable, the core orchestration pipeline continues with warning logs.


OpenWebUI integration

The repository includes pipelines/aria_pipeline.py, which exposes ARIA as an OpenWebUI-compatible pipeline.

The Docker Compose stack starts the pipeline service on:

http://localhost:9099

Configure OpenWebUI to use the pipeline endpoint, then select ARIA Research as a model. The pipeline submits the user's message to /run, polls /status/{run_id}, and streams the completed Markdown report back to the chat interface.


Configuration

The primary configuration files are:

  • .env.example — environment variable template
  • docker-compose.yml — local service topology
  • litellm_config.yaml — model aliases, fallbacks, retries, and budget settings
  • pyproject.toml — Python package, test, lint, and build configuration

Important application variables include:

OPENROUTER_API_KEY=
TAVILY_API_KEY=
E2B_API_KEY=
REDIS_URL=
QDRANT_URL=
QDRANT_API_KEY=
QDRANT_COLLECTION=aria_memory
LANGFUSE_PUBLIC_KEY=
LANGFUSE_SECRET_KEY=
LANGFUSE_HOST=
MLFLOW_TRACKING_URI=
LOG_LEVEL=INFO
ARIA_DEFAULT_MODEL=
ARIA_SESSION_TOKEN_BUDGET=60000

Product and engineering roadmap

Recommended next steps before production adoption:

  1. Add authentication and authorization to the API.
  2. Add tenant isolation for sessions, memory, traces, and reports.
  3. Replace permissive CORS defaults with an explicit allowlist.
  4. Add API rate limiting and request quotas.
  5. Move long-running execution from FastAPI background tasks to a durable worker queue.
  6. Add stronger provenance and citation verification.
  7. Add end-to-end tests against a controlled service environment.
  8. Harden secret management and remove development credentials from default deployments.
  9. Define report-quality SLOs for latency, citation coverage, faithfulness, and failure rate.
  10. Add persistent run cancellation and retry controls.
  11. Review the E2B package-install path and sandbox permissions.
  12. Add production deployment manifests and backup/restore procedures.

Contributing

  1. Create a feature branch.
  2. Add or update tests for behavioral changes.
  3. Run formatting, linting, type checks, and fast evaluations.
  4. Document new skills, endpoints, configuration, or infrastructure dependencies.
  5. Open a pull request describing:
    • The product or engineering problem
    • The proposed change
    • Operational impact
    • Evaluation results
    • Security considerations

Before submitting:

pytest
ruff check .
mypy agents api bus memory observability skills tools
python evals/run_fast_evals.py

License

ARIA is released under the MIT License.


About

Autonomous Research & Intelligence Assistant — multi-agent LangGraph pipeline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages