| .devcontainer | ||
| .forgejo/workflows | ||
| alembic | ||
| benchmarks | ||
| docs | ||
| examples | ||
| features | ||
| plandex | ||
| robot | ||
| scripts | ||
| src/cleveragents | ||
| typings | ||
| v2 | ||
| .bumpversion.cfg | ||
| .cz-config.js | ||
| .cz.json | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .python-version | ||
| alembic.ini | ||
| asv.conf.json | ||
| ATTRIBUTIONS.md | ||
| behave.ini | ||
| CHANGELOG.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS.md | ||
| Dockerfile | ||
| implementation_plan.md | ||
| LICENSE | ||
| mkdocs.yml | ||
| NOTICE | ||
| noxfile.py | ||
| pyproject.toml | ||
| pyrightconfig.json | ||
| README.md | ||
| robot.cfg | ||
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:
cleveragentsandagents - 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_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 diagnosticsprints whether the registry can see your credentials.agents tellandagents buildaccept--provider/--modelflags for one-off overrides.CLEVERAGENTS_TESTING_USE_MOCK_AI=trueforces 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.mdanddocs/reference/env_variables.yaml.