The Problem

Building agents in Claude Code is fast, but moving them to production means re-implementing against a different runtime and paying for expensive hosted models. agentic-flow aims to bridge that gap: develop the agent locally with Claude Code, then deploy the same logic as a hosted agent with cheaper model backends. The repo is a portfolio of related experiments around that goal, not a single product.

What This Does

The repository is a collection of 12 self-contained projects. The core agentic-flow/ package provides agent orchestration: task routing, self-learning hooks (.claude/ contains 350 files of agent definitions), a vector/graph database (packages/agentdb/), and a reasoning backend (reasoningbank/). It also includes a medical AI example (src/types/medical.types.ts), a CRISPR pipeline in Rust (examples/crispr-cas13-pipeline/), and a federated agent demo (examples/federated-agentdb/).

The README claims 66 agents, 213 MCP tools, and SONA (a self-optimizing neural architecture). The code supports these claims: agentic-flow/src/index.ts is the main entry point, and packages/agentdb/ contains substantial vector/graph database code with ONNX and WASM acceleration.

How It Is Wired

Execution starts at main in agentic-flow/src/index.ts:157, which reaches 390 functions. The internal call graph shows main calls assert and validate 23 times each, then runTest 16 times. The most-called functions are delete (60 callers), initialize (39), and resolve (24) — these are the high-blast-radius functions to change carefully.

The database path is short: main -> getStats reaches SQLite via this.db.prepare. The execute -> loadIntelligence path touches the filesystem via fs.readFileSync. The handler entry point in examples/federated-agentdb/serverless-lambda.ts spawns a process that initializes a GraphDatabase and calls a transformers pipeline for inference.

Key files and their responsibilities:

  • agentic-flow/src/utils/logger.ts — logging hub, 70 modules depend on it
  • agentic-flow/src/agentdb/optimizations/QueryOptimizer.ts — query orchestration, 154 functions reachable
  • agentic-flow/src/agentdb/optimizations/BatchOperations.ts — batch DB writes
  • agentic-flow/src/router/providers/anthropic.ts — the only file making outbound network calls for inference
  • packages/agentdb/src/backends/graph/GraphDatabaseAdapter.ts — graph DB storage

The module graph shows 8 modules in circular dependencies, including benchmark files in packages/agentdb/benchmarks/.

How To Use It

From the README:

npx agentic-flow init
npx agentic-flow hooks pretrain
claude

The package is on npm (agentic-flow), so npm install agentic-flow works. The TypeScript API is new AgenticFlow() then await flow.initialize() and flow.route('task'). Dockerfiles exist for various test scenarios. Configuration is via environment variables in .env.test and agentic-flow/config/.env.fastmcp.

Real-World Use

A team builds a medical diagnosis agent in Claude Code with the medical types from src/types/medical.types.ts. They test locally, then deploy the same logic to a serverless function (examples/federated-agentdb/serverless-lambda.ts) with a cheaper model backend via the router in agentic-flow/src/router/providers/anthropic.ts. The agent stores episodes in the graph database for future learning.

Code Health & Issues

Static analysis found 165 issues (21 high, 123 medium, 21 low). Key findings:

  • High — Hub modules: logger.ts has 70 dependents; changes ripple widely
  • High — Deep nesting (max depth 7) in verification-service.ts, HybridBackend.ts, and the Rust pathways.rs
  • High — Import cycles in packages/agentdb/benchmarks/
  • High — 2,609 duplicated 6-line blocks across 220 files
  • High — CI workflows use unpinned action tags (docker/setup-buildx-action@v3), continue-on-error on correctness steps, and discard exit codes
  • High — Committed .env files (.env.test, .env.docker-test, .env.fastmcp) — rotate credentials
  • High — No LICENSE file at root despite README claiming MIT
  • Medium — No Dependabot, unpinned base images, large binaries (25.8MB .node file) in git

The Bottom Line

This is a large, ambitious portfolio with substantial working code — the agentdb, router, and orchestration pieces are real. But it's a collection of experiments, not a polished product: 4,455 files, duplicated code, secret-shaped files committed, and CI that can report green on failure. Use it as a reference for agent architecture patterns, not as a dependency.