No description
Find a file
2025-12-29 21:25:14 -05:00
.devcontainer Significantly revamped the base project to use more robust static checking including benchmarks and integration test support 2025-10-31 16:18:53 -04:00
.forgejo/workflows Significantly revamped the base project to use more robust static checking including benchmarks and integration test support 2025-10-31 16:18:53 -04:00
alembic Feat: Adding Actors support to database 2025-12-19 12:35:56 -05:00
benchmarks Tests: Extended Stage 7 benchmarks with latency + token metrics after tuning 2025-12-12 08:20:37 -05:00
docs Docs: Wrote the provider integration documentation 2025-12-10 12:58:23 -05:00
examples Significantly revamped the base project to use more robust static checking including benchmarks and integration test support 2025-10-31 16:18:53 -04:00
features Feat: Pulled in core engine from v2 for running configs 2025-12-29 21:25:14 -05:00
plandex Updated format of plandex 2025-11-01 21:21:23 -04:00
robot Feat: Pulled in core engine from v2 for running configs 2025-12-29 21:25:14 -05:00
scripts Removed sync and install scripts 2025-11-05 18:16:54 -05:00
src/cleveragents Feat: Pulled in core engine from v2 for running configs 2025-12-29 21:25:14 -05:00
typings Feat Added ability for PlanService to take per-request providers 2025-12-08 17:45:49 -05:00
v2 Chore: Updated and fixed v2 directory for easy reference 2025-12-24 19:09:55 -05:00
.bumpversion.cfg Added boilerplate code for python 2024-03-06 23:57:14 -05:00
.cz-config.js Initial commit 2024-01-25 23:10:04 -05:00
.cz.json Initial commit 2024-01-25 23:10:04 -05:00
.dockerignore Significantly revamped the base project to use more robust static checking including benchmarks and integration test support 2025-10-31 16:18:53 -04:00
.editorconfig Initial commit 2024-01-25 23:10:04 -05:00
.gitattributes Initial commit 2024-01-25 23:10:04 -05:00
.gitignore Build: Made Robot integration tests run in parallel 2025-12-20 10:28:51 -05:00
.python-version Significantly revamped the base project to use more robust static checking including benchmarks and integration test support 2025-10-31 16:18:53 -04:00
alembic.ini feat: continued with phase 2 adding database migration scripts to the mix 2025-11-13 18:25:24 -05:00
asv.conf.json feat(discovery): Add implicit runtime behavior extraction and analysis 2025-11-03 21:12:11 -05:00
ATTRIBUTIONS.md Initial commit 2024-01-25 23:10:04 -05:00
behave.ini Feat: Adding Actors support to database 2025-12-19 12:35:56 -05:00
CHANGELOG.md Refactored the boilerplate code to CleverAgents 2025-11-01 19:04:29 -04:00
CODE_OF_CONDUCT.md Initial commit 2024-01-25 23:10:04 -05:00
CONTRIBUTING.md Chore: Completed stage 1.5 2025-11-24 20:04:18 -05:00
CONTRIBUTORS.md Initial commit 2024-01-25 23:10:04 -05:00
Dockerfile Refactored the boilerplate code to CleverAgents 2025-11-01 19:04:29 -04:00
implementation_plan.md Feat: Pulled in core engine from v2 for running configs 2025-12-29 21:25:14 -05:00
LICENSE Added Apache OSS license 2024-01-25 23:14:00 -05:00
mkdocs.yml Refactored the boilerplate code to CleverAgents 2025-11-01 19:04:29 -04:00
NOTICE Added Apache OSS license 2024-01-25 23:14:00 -05:00
noxfile.py Feat: Added basic scaffolding for actors 2025-12-23 17:12:16 -05:00
pyproject.toml Feat: Pulled in core engine from v2 for running configs 2025-12-29 21:25:14 -05:00
pyrightconfig.json Refactored the boilerplate code to CleverAgents 2025-11-01 19:04:29 -04:00
README.md Docs: Wrote the provider integration documentation 2025-12-10 12:58:23 -05:00
robot.cfg Significantly revamped the base project to use more robust static checking including benchmarks and integration test support 2025-10-31 16:18:53 -04:00

CleverAgents Core

CleverAgents is the Python-first migration of the Plandex automation platform. It provides a unified agents CLI, embedded runtime, and service orchestration tools that mirror the original Go workflows while embracing modern Python tooling.

Highlights

  • Unified CLI entry points: cleveragents and agents
  • Fast Typer/Click-based interface with parity for help/version behavior
  • Behavior-driven coverage via Behave and Robot Framework
  • Nox automation for linting, typing, testing, docs, builds, and benchmarks
  • MkDocs-powered documentation with CleverAgents branding

Quick Start

# clone the CleverAgents core repository
git clone https://git.cleverthis.com/cleveragents/core.git
cd core

# install dependencies
python -m venv .venv
source .venv/bin/activate
pip install -e .[tests,docs]

# verify the CLI
agents --help
agents --version

Developing

# run validation suites
nox -s format
nox -s lint
oxt -s typecheck
nox -s unit_tests
nox -s integration_tests

Documentation

nox -s docs
nox -s serve_docs

Tests

Behave feature scenarios live under features/ and Robot suites under robot/. Use the Nox sessions above to execute them in parity with the implementation plan.

Observability

LangSmith tracing is optional and off by default. Enable it by exporting CLEVERAGENTS_LANGSMITH_ENABLED=true along with a project name and API key (CLEVERAGENTS_LANGSMITH_PROJECT, CLEVERAGENTS_LANGSMITH_API_KEY). The settings module automatically mirrors these values to LANGCHAIN_TRACING_V2, LANGCHAIN_PROJECT, and LANGCHAIN_API_KEY, so LangChain/LangGraph agents emit traces without extra wiring. Additional knobs such as CLEVERAGENTS_LANGSMITH_ENDPOINT, CLEVERAGENTS_LANGSMITH_USER_ID, and CLEVERAGENTS_LANGSMITH_TAGS are documented in docs/observability.md.

LLM provider configuration

CleverAgents ships with a LangChain/LangGraph powered provider registry that discovers whichever API keys you export and automatically selects the best available provider. The CLI always prefers explicit choices (agents tell --provider anthropic --model claude-sonnet-4-20250514), followed by CLEVERAGENTS_DEFAULT_PROVIDER and CLEVERAGENTS_DEFAULT_MODEL, then any defaults defined inside Settings, and finally the built-in fallback order (openai → anthropic → google → azure → openrouter → groq → together → cohere → gemini).

Required environment variables

Provider Primary variables
OpenAI OPENAI_API_KEY
Anthropic ANTHROPIC_API_KEY
Google GOOGLE_API_KEY or GOOGLE_GENAI_API_KEY
Azure OpenAI AZURE_OPENAI_API_KEY plus AZURE_OPENAI_ENDPOINT/AZURE_OPENAI_DEPLOYMENT
OpenRouter OPENROUTER_API_KEY (+ optional CLEVERAGENTS_OPENROUTER_ORGANIZATION for sanitized headers)
Gemini GEMINI_API_KEY or GOOGLE_GEMINI_API_KEY
Cohere COHERE_API_KEY
Groq GROQ_API_KEY
Together TOGETHER_API_KEY

Set CLEVERAGENTS_DEFAULT_PROVIDER to pin the global provider (for example export CLEVERAGENTS_DEFAULT_PROVIDER=openai) and CLEVERAGENTS_DEFAULT_MODEL to lock in a model ID. When unset, the registry picks the first configured provider and uses its published default model such as gpt-4o for OpenAI or claude-sonnet-4-20250514 for Anthropic.

Diagnostics and testing shortcuts

  • agents diagnostics prints whether the registry can see your credentials.
  • agents tell and agents build accept --provider/--model flags for one-off overrides.
  • CLEVERAGENTS_TESTING_USE_MOCK_AI=true forces the in-repo mock provider so Behave/Robot suites never hit external APIs.
  • The full capability matrix (streaming, tool calls, JSON mode, etc.) plus every supported environment variable is documented in docs/reference/providers.md and docs/reference/env_variables.yaml.