CleverActors — pure Python library for declarative actor definitions: YAML schema, Jinja2 preprocessing, validation, and LangGraph compilation. Extracted from cleveragents-core.
  • Python 81.4%
  • Gherkin 16.3%
  • RobotFramework 2%
  • Shell 0.3%
Find a file
CoreRasurae 2072bc3ad1
All checks were successful
CI / lint (pull_request) Successful in 51s
CI / typecheck (pull_request) Successful in 58s
CI / security (pull_request) Successful in 55s
CI / quality (pull_request) Successful in 38s
CI / unit_tests (pull_request) Successful in 3m14s
CI / integration_tests (pull_request) Successful in 1m13s
CI / build (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 3m16s
CI / status-check (pull_request) Successful in 3s
CI / lint (push) Successful in 38s
CI / typecheck (push) Successful in 53s
CI / security (push) Successful in 52s
CI / quality (push) Successful in 36s
CI / unit_tests (push) Successful in 3m12s
CI / integration_tests (push) Successful in 1m9s
CI / build (push) Successful in 37s
CI / coverage (push) Successful in 3m12s
CI / status-check (push) Successful in 4s
feat(langgraph): implement real type:tool graph node execution via ToolAgent dispatch
Wires NodeConfig.tool and NodeConfig.static_config through to
ToolAgent.invoke() so type: tool graph nodes execute real tool
calls instead of returning no-ops.

- NodeConfig: adds tool (str | None) and static_config (dict)
- Node._execute_tool: creates ToolAgent, invokes with static config
  merged with threaded previous output, returns ToolMessage
- runtime_dispatch: auto-creates ToolAgent for type: tool nodes
  without pre-registered agents
- pure_graph: parses tool:/config: YAML keys into NodeConfig
- BDD: 11 scenarios, 33 steps, all passing

Closes #75
2026-07-09 14:06:59 +00:00
.forgejo/workflows ci: Initial CI setup 2026-05-26 22:14:06 +01:00
benchmarks fix(actors): llm token consumption undercounted 2026-07-01 14:55:58 +01:00
docs feat(agents): add LLM agent retry mechanisms with exponential backoff 2026-07-03 16:00:11 +01:00
features feat(langgraph): implement real type:tool graph node execution via ToolAgent dispatch 2026-07-09 14:06:59 +00:00
hooks chore: apply end-of-file and trailing-whitespace fixes to config files 2026-05-27 21:41:39 +00:00
robot feat(agents): add tool-call support to LLMAgent.stream_message 2026-07-02 07:47:39 +00:00
scripts chore: Base repo structure commit 2026-05-26 21:45:54 +01:00
src/cleveractors feat(langgraph): implement real type:tool graph node execution via ToolAgent dispatch 2026-07-09 14:06:59 +00:00
tests test(robot): add end-to-end integration tests for email categorization actor graph 2026-06-15 23:13:35 +01:00
.bumpversion.cfg chore: Update some repo configurations and documents 2026-05-26 22:12:25 +01:00
.copier-answers.base-oss.yml chore: Update some repo configurations and documents 2026-05-26 22:12:25 +01:00
.copier-answers.base-python.yml chore: Update some repo configurations and documents 2026-05-26 22:12:25 +01:00
.editorconfig chore: Update some repo configurations and documents 2026-05-26 22:12:25 +01:00
.gitignore feat(registry): implement RegistryCache with LRU eviction and TTL 2026-06-11 19:26:04 +01:00
.pre-commit-config.yaml chore: fix pre-commit hooks — update paths and lint/format issues 2026-05-27 21:27:36 +00:00
.semgrep.yml chore: Update some repo configurations and documents 2026-05-26 22:12:25 +01:00
asv.conf.json test(benchmark): Fix failing benchmark tests from pre-existing features 2026-06-12 17:11:32 +01:00
ATTRIBUTIONS.md chore: Update some repo configurations and documents 2026-05-26 22:12:25 +01:00
behave.ini chore: Base repo structure commit 2026-05-26 21:45:54 +01:00
CHANGELOG.md feat(langgraph): implement real type:tool graph node execution via ToolAgent dispatch 2026-07-09 14:06:59 +00:00
CODE_OF_CONDUCT.md chore: Update some repo configurations and documents 2026-05-26 22:12:25 +01:00
CONTRIBUTING.md chore: apply end-of-file and trailing-whitespace fixes to config files 2026-05-27 21:41:39 +00:00
CONTRIBUTORS.md feat(merge_configs): expose public merge_configs(*dicts) API per §3.1 deep-merge algorithm 2026-06-03 14:44:18 +00:00
LICENSE chore: Base repo structure commit 2026-05-26 21:45:54 +01:00
mkdocs.yml docs(registry): add MkDocs API documentation and usage examples for Package Registry Client 2026-06-17 14:09:28 +00:00
NOTICE chore: Update some repo configurations and documents 2026-05-26 22:12:25 +01:00
noxfile.py test(robot): add end-to-end integration tests for email categorization actor graph 2026-06-15 23:13:35 +01:00
pyproject.toml fix(build): cap robotframework<7.0 for pabot 5.3 compatibility 2026-06-15 23:13:49 +01:00
pyrightconfig.json chore: apply end-of-file and trailing-whitespace fixes to config files 2026-05-27 21:41:39 +00:00
README.md chore: Update some repo configurations and documents 2026-05-26 22:12:25 +01:00
SECURITY.md chore: Base repo structure commit 2026-05-26 21:45:54 +01:00
vulture_whitelist.py feat(registry): implement ReferenceResolver with version alias resolution 2026-06-10 12:04:00 +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.