test
  • Python 75.8%
  • Gherkin 18.3%
  • RobotFramework 4.8%
  • TypeScript 0.9%
  • Shell 0.2%
Find a file
HAL 9000 018a316768
All checks were successful
CI / push-validation (push) Successful in 11s
CI / load-versions (push) Successful in 13s
CI / quality (push) Successful in 27s
CI / typecheck (push) Successful in 44s
CI / lint (push) Successful in 57s
CI / security (push) Successful in 1m12s
CI / build (push) Successful in 3m18s
CI / helm (push) Successful in 3m25s
CI / unit_tests (push) Successful in 4m55s
CI / docker (push) Successful in 1m10s
CI / integration_tests (push) Successful in 10m38s
CI / coverage (push) Successful in 11m42s
CI / status-check (push) Successful in 1s
CI / benchmark-publish (push) Successful in 1h45m27s
CI / benchmark-regression (push) Has been skipped
Merge pull request 'fix(v3.7.0): resolve issue #1500 - actor add --update flag enforcement' (#1513) from fix/1500-impl into master
2026-06-19 07:36:09 +00:00
.devcontainer chore(ci): fix pre-commit hook failures 2026-06-14 09:51:14 -04:00
.forgejo perf(ci): reduce CI quality check execution time by parallelizing and caching 2026-06-18 04:00:46 -04:00
.opencode build fixed weird forgejo bug 2026-06-18 03:03:26 -04:00
asv/benchmarks chore(ci): fix pre-commit hook failures 2026-06-14 09:51:14 -04:00
automated_attempts chore(attempt): add automated attempt note for PR #8193 — Tier 0 2026-05-03 00:17:15 +00:00
benchmarks style(acms): apply ruff format to fix CI lint format check failure 2026-06-17 23:15:50 -04:00
docs docs(spec): align custom resource type YAML format with schema definition 2026-06-19 01:49:37 -04:00
examples chore(ci): fix pre-commit hook failures 2026-06-14 09:51:14 -04:00
features fix(cli): add @tdd_issue_1500 tag and Robot Framework enforcement tests 2026-06-19 02:48:06 -04:00
hooks feat(resource): add cloud infrastructure resources 2026-03-17 13:14:37 -04:00
k8s feat(server): add Kubernetes Helm chart for server deployment (#1085) 2026-03-27 23:53:22 +00:00
robot fix(cli): add @tdd_issue_1500 tag and Robot Framework enforcement tests 2026-06-19 02:48:06 -04:00
scripts fix(context-policy): resolve AmbiguousStep conflict and fix ruff formatting 2026-06-19 00:18:05 -04:00
src/cleveragents fix(cli): resolve PR #1513 review blockers — fix actor add --update enforcement tests 2026-06-19 02:48:05 -04:00
tests fix(events): restore event bus close and bridge semantics 2026-06-18 10:38:44 +00:00
typings fix(cli,memory): catch typer.Exit in actor CLIs and align SQLChatMessageHistory kwarg 2026-06-14 16:11:26 -04: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 feat(server): add Kubernetes Helm chart for server deployment (#1085) 2026-03-27 23:53:22 +00:00
.editorconfig Initial commit 2024-01-25 23:10:04 -05:00
.gitattributes Initial commit 2024-01-25 23:10:04 -05:00
.gitignore feat: implement automation profile precedence chain plan action global 2026-06-02 01:25:33 -04:00
.importlinter refactor: route CLI→Application communication through A2A boundary 2026-06-06 19:05:19 -04:00
.pre-commit-config.yaml feat(server): add Kubernetes Helm chart for server deployment (#1085) 2026-03-27 23:53:22 +00: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
.semgrep.yml chore(testing): enforce semgrep gate for suppressed exceptions 2026-06-14 19:05:21 -04:00
.tool-versions chore(ci): centralize tool version management into a single source of truth 2026-06-15 02:03:56 -04:00
analysis_results.txt fix: restore CI quality tests to passing state (#4175) 2026-04-08 11:02:14 +00:00
asv.conf.json fix(ci): make benchmark-regression resilient to missing S3 baselines 2026-05-13 12:24:33 +00:00
ATTRIBUTIONS.md Initial commit 2024-01-25 23:10:04 -05:00
behave.ini fix: restore CI quality tests to passing state (#4175) 2026-04-08 11:02:14 +00:00
CHANGELOG.md chore(docs): add #1500 entry to CHANGELOG.md and CONTRIBUTORS.md 2026-06-19 02:48:05 -04:00
clone_dir.txt fix(cli): make version command show actual git commit (#1520) 2026-04-02 21:30:05 +00:00
CODE_OF_CONDUCT.md Initial commit 2024-01-25 23:10:04 -05:00
CONTRIBUTING.md chore(testing): enforce semgrep gate for suppressed exceptions 2026-06-14 19:05:21 -04:00
CONTRIBUTORS.md chore(docs): add #1500 entry to CHANGELOG.md and CONTRIBUTORS.md 2026-06-19 02:48:05 -04:00
docker-compose.yml feat(server): implement PostgreSQL storage backend for server mode 2026-05-29 01:04:59 -04:00
Dockerfile chore(ci): optimize Dockerfile layer order to cache Python dependency installation 2026-04-26 10:02:20 +00:00
Dockerfile.server fix(ci): make Dockerfile.server Trivy gate actionable 2026-06-18 00:16:54 -04:00
Dockerfile.server.dockerignore feat(server): add Kubernetes Helm chart for server deployment (#1085) 2026-03-27 23:53:22 +00:00
LICENSE chore(ci): fix pre-commit hook failures 2026-06-14 09:51:14 -04:00
mkdocs.yml docs: add sandbox, correction, and invariant module guides 2026-06-16 18:18:18 -04:00
NOTICE Added Apache OSS license 2024-01-25 23:14:00 -05:00
noxfile.py test(test-infra): fix Semgrep CI lint failures and strengthen BDD assertions 2026-06-14 19:05:21 -04:00
pyproject.toml fix(providers): use langchain-ollama package for ChatOllama import 2026-06-18 00:36:05 -04:00
pyrightconfig.json Merge branch 'master' into develop-20260217 2026-02-18 03:27:00 +00:00
README.md docs: update documentation for v3.8.0 unreleased features 2026-04-05 19:33:19 +00: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
TODO_FIXME_RESOLUTION.md refactor(codebase): address TODO/FIXME comments across application and CLI layers 2026-06-04 18:11:11 -04:00
uv.lock fix(providers): use langchain-ollama package for ChatOllama import 2026-06-18 00:36:05 -04:00
vulture_whitelist.py fix(tui): resolve lint and AmbiguousStep errors in TuiMaterializer 2026-06-15 11:14:31 +00:00

CleverAgents Core

CleverAgents is a Python-first automation platform. It provides a unified agents CLI, an interactive Textual TUI, embedded runtime, and service orchestration tools while embracing modern Python tooling.

Highlights

  • Unified CLI entry points: cleveragents and agents
  • Interactive TUI (agents tui) — full-screen Textual app with multi-session tabs, persona switching, slash commands, reference picker, and context-sensitive F1 help
  • Persona system — YAML-backed personas bind actors, argument presets, and scope references to named identities; persisted in ~/.config/cleveragents/personas/
  • Session management — create, list, export, and import conversation sessions; full JSON export/import for portability; Markdown transcript export (--format md) for human-readable sharing
  • First-run experienceActorSelectionOverlay guides new users to pick an actor on first TUI launch; creates a "default" persona automatically
  • Server modeagents server connect configures a remote CleverAgents server; Kubernetes Helm chart in k8s/ for production deployment
  • A2A integration — Agent-to-Agent protocol facade wires CLI and TUI to live application services (session, plan, registry, event)
  • Permissions screen — TUI overlay for reviewing tool permission requests with unified, side-by-side, and context diff views; session-scoped allow/reject decisions
  • Actor thought blocks — expandable reasoning trace widgets rendered inline in the conversation stream with muted styling
  • UKO runtime — Universal Knowledge Ontology query interface, inference engine, and graph persistence for ACMS context strategies
  • Database resource handler — full CRUD and checkpoint/rollback support for SQLite, PostgreSQL, MySQL, and DuckDB resources
  • Estimation lifecycleactor.default.estimation config key wires an estimation actor into the Strategize-to-Estimate lifecycle hook
  • Shell danger detection — TUI shell mode (! prefix) classifies commands by danger level (LOW → CRITICAL) and surfaces a warning overlay before executing destructive, privilege-escalating, or exfiltration-risk commands
  • Inline permission questionsPermissionQuestionWidget renders single-file permission requests directly in the conversation stream with single-key shortcuts
  • Invariant reconciliationInvariantReconciliationActor runs automatically at every plan phase transition; failures block the transition and emit INVARIANT_VIOLATED
  • UKO provenance tracking — every typed triple now carries sourceResource, validFrom, and isCurrent metadata; a revision chain enables temporal queries
  • JSON-RPC 2.0 A2A wire formatA2aRequest/A2aResponse fields renamed to standard JSON-RPC 2.0 names (method, id, result, error)
  • 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 ".[dev,tests,docs]"

# set up pre-commit hooks and verify tooling
bash scripts/setup-dev.sh

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

Launch the TUI

# install TUI extra
pip install -e ".[tui]"

# launch the interactive terminal UI
agents tui

Inside the TUI:

  • Type a message and press Enter to chat with the active actor
  • Press / to open the slash command overlay (67 commands across 14 groups)
  • Press @ to open the reference picker and insert file/resource references
  • Press ! to enter shell mode and run a subprocess command
  • Press F1 to toggle the context-sensitive help panel
  • Press Ctrl+T to cycle through argument presets for the active persona
  • Press Ctrl+Q to quit

Session management

agents session create --actor openai/gpt-4o
agents session list
agents session export --session-id <ID> --output session.json
agents session import --input session.json

Server mode

# connect to a remote CleverAgents server
agents server connect --url https://my-server.example.com --token <TOKEN>

# check connection status
agents server status

Developing

Pre-commit hooks run automatically on every git commit (formatting, linting, type checking, security scanning). To run checks manually:

# core validation
nox -s format            # ruff auto-formatting
nox -s lint              # ruff linting
nox -s typecheck         # pyright type checking
nox -s unit_tests        # behave unit tests
nox -s integration_tests # robot integration tests

# quality & security
nox -s security_scan     # bandit security scanning
nox -s dead_code         # vulture dead code detection
nox -s complexity        # radon complexity analysis
nox -s pre_commit        # run all pre-commit hooks
nox -s adr_compliance    # verify ADR compliance

For the full quality automation guide, see docs/development/quality-automation.md.

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 now uses actors: select an actor with --actor <name> (or set a default via agents actor set-default). Actors embed provider/model choices; built-in actors are seeded from CLEVERAGENTS_DEFAULT_PROVIDER / CLEVERAGENTS_DEFAULT_MODEL, then fall back to the built-in 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 and which actor/provider is selected.
  • agents tell and agents build require --actor <name> unless a default actor is set; use agents actor set-default <name> to configure one.
  • Built-in actors (<provider>/<model>) are immutable, custom actors must be named local/<id>, and the default actor cannot be removed. Use --unsafe when adding/updating configs marked unsafe; runtime only warns when invoking unsafe actors.
  • 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.) is documented in docs/reference/providers.md.