CoreRasurae a1fd36932f
CI / lint (pull_request) Successful in 44s
CI / typecheck (pull_request) Successful in 1m32s
CI / security (pull_request) Successful in 1m15s
CI / quality (pull_request) Successful in 47s
CI / build (pull_request) Successful in 2m4s
CI / integration_tests (pull_request) Successful in 4m18s
CI / unit_tests (pull_request) Successful in 5m41s
CI / coverage (pull_request) Successful in 4m36s
CI / status-check (pull_request) Successful in 7s
CI / benchmark (pull_request) Failing after 17m20s
fix(ci): make benchmark_regression job fast and correctly fail on regressions
Three compounding issues in the benchmark_regression CI check, found
while investigating a 41m13s hang/timeout on PR #85's run (job 205876):

1. `asv continuous` ran with no speed-oriented flags, fully calibrating
   and repeating every one of 138 benchmark runs (69 benchmarks x 2
   commits). Per-benchmark ASV overhead (calibration + repeat + process
   averaging) cost 20-90s of wall clock per benchmark, dwarfing the
   actual measured microsecond-to-millisecond costs. `noxfile.py`'s
   `benchmark_regression` session now forwards *session.posargs to
   `asv continuous`, so its own default (full, accurate) behavior is
   unchanged when called without extra args; `.gitea/workflows/ci.yml`'s
   `benchmark` job now invokes `nox -s benchmark_regression -- --quick`,
   scoping ASV's single-run mode to this informational job only.

2. With --quick applied, a new bottleneck surfaced: asv.conf.json's
   build/install/uninstall commands used plain `python -m build`/`pip`,
   which silently spent ~11 minutes per run in pip's resolver (build
   isolation + a full, uncached dependency install per compared commit,
   no progress output during backtracking). Switched to `uv build`/
   `uv pip install`/`uv pip uninstall`. `uv` isn't installed inside each
   ASV-managed virtualenv by default (asv's find_executable only
   searches that venv's own bin/, not $PATH), so added `uv` to asv's
   `matrix` config to have it pip-installed during venv bootstrap
   (already-fast for a single small package), and pass `--python
   {env_dir}/bin/python` explicitly to each command since standalone
   `uv` (unlike `python -m pip`) has no unambiguous way to infer which
   of asv's several per-commit venvs to target otherwise. Also added
   `--force-reinstall` to the install command per asv's own documented
   rationale (compared commits may share the same package version).

3. `asv continuous` returns the boolean `worsened` as its process exit
   code (0 = no significant regression, 1 = a benchmark measurably
   worsened past --factor) -- there is no exit code 2 in this asv
   version. `noxfile.py`'s `success_codes=[0, 2]` therefore never
   actually matched the real "worsened" code, silently making this
   session fail on *any* regression signal regardless of significance.
   Corrected to `success_codes=[0]`, so the session (and CI job step)
   now fails specifically when asv reports a real, significant
   regression -- the CI job's existing `continue-on-error: true` is
   what keeps this from blocking the PR, not this success list.

Verified locally end-to-end (rm -rf .asv/env .asv/results between
runs): completes in ~3-11 minutes (vs. the prior 40+ minute
hang/timeout), and the session now correctly reports "failed" when
asv detects a significant regression between the compared commits.

ISSUES CLOSED: #86
2026-07-31 14:12:50 +00:00
2026-05-26 21:45:54 +01:00
2026-05-26 21:45:54 +01:00
2026-05-26 21:45:54 +01:00
2026-05-26 21:45:54 +01:00

CleverActors

CleverActors is the reactive agent framework used by CleverAgents and CleverRouter.

It provides a Python library that lets a host application:

  • Parse CleverAgents v2 YAML configuration files (with Jinja2 templates and ${ENV_VAR} interpolation).
  • Validate configuration against the built-in schema validator.
  • Create reactive agent networks with RxPy streams, LangGraph graphs, or hybrid pipelines of both.
  • Run single-shot prompts, interactive CLI sessions, or stream-based processing via the ReactiveCleverAgentsApp orchestrator.

Install

pip install "cleveractors @ git+https://git.cleverthis.com/cleverlibre/cleveractors@master"

Quick start

from cleveractors import ReactiveCleverAgentsApp

app = ReactiveCleverAgentsApp(config_files=["config.yaml"])
result = await app.run_single_shot("Hello, agents!")
print(result)

Using agents directly

from cleveractors import Agent
from cleveractors.agents.llm import LLMAgent

agent = LLMAgent(
    name="assistant",
    config={"provider": "openai", "model": "gpt-4o", "system_prompt": "Be helpful."},
)
response = await agent.process_message("What is 2+2?")
print(response)

LangGraph workflows

from cleveractors.langgraph import LangGraph, Node, NodeType, GraphState

graph = LangGraph(name="my_workflow", config={})
graph.add_node(Node(name="start", node_type=NodeType.AGENT, agent="assistant"))
graph.add_node(Node(name="end", node_type=NodeType.END))
graph.add_edge("start", "end")
result = await graph.execute({"message": "Hello"})

Reactive stream routing

from cleveractors.reactive.stream_router import ReactiveStreamRouter, StreamType

router = ReactiveStreamRouter()
stream = router.create_stream({"name": "pipeline", "type": StreamType.HOT})
router.send_message("pipeline", "Process this message")

Package structure

Module Purpose
cleveractors Top-level exports: Agent, ContextManager, ReactiveCleverAgentsApp, CleverAgentsException
cleveractors.agents Agent implementations: LLMAgent, ToolAgent, CompositeAgent, ChainAgent, AgentFactory
cleveractors.core Core framework: ReactiveCleverAgentsApp, ConfigurationManager, ProgressBarManager, exceptions
cleveractors.langgraph LangGraph integration: LangGraph, PureLangGraph, Node, GraphState, StateManager, RxPyLangGraphBridge
cleveractors.reactive RxPy streams: ReactiveStreamRouter, StreamMessage, RouteConfig, ReactiveConfigParser
cleveractors.templates Jinja2+YAML template system: BaseTemplate, TemplateRegistry, AgentTemplate, GraphTemplate, StreamTemplate

Key exports

from cleveractors import Agent, ContextManager, ReactiveCleverAgentsApp, CleverAgentsException
from cleveractors.core.exceptions import ConfigurationError, TemplateError, RoutingError, ExecutionError
from cleveractors.core.config import ConfigurationManager
from cleveractors.agents.factory import AgentFactory
from cleveractors.langgraph import LangGraph, Node, NodeType, GraphState, StateManager
from cleveractors.langgraph.pure_graph import PureLangGraph, create_pure_langgraph
from cleveractors.reactive.stream_router import ReactiveStreamRouter, StreamType, StreamMessage
from cleveractors.templates import BaseTemplate, TemplateType, TemplateParameter, TemplateRegistry

License

MIT — see LICENSE.

See also CleverAgents Operations Code (CONTRIBUTING) for commit, PR, and testing conventions.

S
Description
CleverActors — pure Python library for declarative actor definitions: YAML schema, Jinja2 preprocessing, validation, and LangGraph compilation. Extracted from cleveragents-core.
Readme 4 MiB
Languages
Python 81.4%
Gherkin 16.3%
RobotFramework 2%
Shell 0.3%