Composable agentic framework on top of atomr actors and atomr-infer.
Project description
atomr-agents
A native Rust agentic framework built as a layered actor / strategy / harness substrate on top of atomr and atomr-infer. atomr-agents gives you a single mental model — pluggable strategies that resolve under shared budgets, channelled state with first-class checkpointing, tool-call orchestration with parallel dispatch, and durable harness loops — that scales from a one-off chatbot to a multi-tenant production agent platform.
use atomr_agents::prelude::*;
// One Pipeline composes prompt → model → parser like LCEL.
let pipeline = Pipeline::from(prompt)
.then(model)
.then(parser)
.build();
let answer = pipeline.call(input, ctx).await?;
Why an agentic framework, in Rust, on actors
Agentic systems don't fail because the models aren't good enough — they fail because the substrate underneath them treats context, composition, and persistence as afterthoughts. Glue-code retry policies, opaque memory, hand-rolled tool loops, brittle handoff between agents — that's where 3 a.m. pages come from.
Composition is the unit of work. A real agent is a Pipeline of
prompts, models, parsers, and tools — each with its own retry,
fallback, timeout, cache, and trace policy. atomr-agents makes every
component a Callable with the same composition surface, so
with_retry, with_fallbacks, and with_config apply uniformly to
prompts, models, retrievers, and parsers alike.
State is channelled, durable, and forkable. Long-running agents
need more than chat history. They need typed channels with
reducers (AppendMessages, MergeMap, LastWriteWins,
MaxByTimestamp), per-super-step checkpoints keyed by (workflow, run, step), and fork-with-edit so an operator can branch a
divergent run from any prior state. atomr-agents ships LangGraph's
state model verbatim in atomr's actor idiom.
Tool calls are parallel and provider-agnostic. When a model emits
five tool calls in one turn, atomr-agents fans them into a JoinSet
and aggregates in original order. The streaming tool_call_delta
parser handles OpenAI and Anthropic deltas natively; new providers
plug in behind the same Provider enum. RichTool returns
ToolReturn::{Content, ContentAndArtifact, Command} so a tool can
also drive graph control flow.
Granular efficiency. Rust gives us deterministic resource use,
zero-cost abstractions, and ownership-as-concurrency-safety. Strategy
trait generics monomorphize the per-turn pipeline; Box<dyn> opt-in
exists for config-driven loading. The whole 26-crate workspace builds
under cargo check --workspace in seconds and ships zero runtime
overhead beyond what the actor crate already pays.
What's in the box
| Crate | What it does |
|---|---|
atomr-agents |
Umbrella facade re-exporting the public surface, feature-flag-driven |
atomr-agents-core |
Ids, budgets (token / time / money / iteration), AgentContext, RunId, structured Event taxonomy, error types |
atomr-agents-callable |
Callable trait, CallableHandle, Pipeline builder (then / fan_out / assign), decorators (with_retry / with_fallbacks / with_config / with_timeout / Branch / Lambda) |
atomr-agents-strategy |
Strategy trait family (ToolStrategy, MemoryStrategy, SkillStrategy, RoutingStrategy, PolicyStrategy, LoopStrategy, TerminationStrategy) + combinators |
atomr-agents-context |
ContextAssembler — priority-merge under a TokenBudget |
atomr-agents-observability |
EventBus, RunTree builder, Tracer trait, StdoutTracer / JsonlTracer / LangSmithTracer |
atomr-agents-state |
StateSchema + 5 reducers, RunState, Checkpointer trait + InMemoryCheckpointer, fork-with-edit; SQLite/Postgres backend stubs behind features |
atomr-agents-tool |
Tool / RichTool traits, ToolDescriptor, ToolSet + ToolSetRegistry, PermissionSpec, provider-aware ToolCallParser (OpenAI / Anthropic), HandoffTool |
atomr-agents-skill |
Skill, SkillSet, Static / Keyword skill strategies |
atomr-agents-memory |
MemoryStore (short-term) + LongStore (long-term, namespace-tupled), RecencyMemoryStrategy / SummarizingMemoryStrategy / ChainedMemoryStrategy, WriteMemoryTool / UpdateMemoryTool / RecallMemoryTool |
atomr-agents-embed |
Embedder trait, MockEmbedder, AnnIndex + InMemoryAnnIndex, EmbeddingToolStrategy |
atomr-agents-retriever |
Retriever zoo: Bm25 / Vector / MultiQuery / ContextualCompression / ParentDocument / Ensemble (RRF) / SelfQuery / EmbeddingsFilter / TimeWeighted |
atomr-agents-ingest |
Loader (text / md / json / csv) + splitters (Recursive / MarkdownHeader / Code / Token / Semantic) + CachedEmbedder + IngestPipeline |
atomr-agents-persona |
All five structural strategies (Static, BigFive, Mbti, Jungian, Composite) + emphasis strategies (Static, AudienceAdaptive, TaskAdaptive, MoodState, GoalConditioned) |
atomr-agents-instruction |
ComposedInstructionStrategy<P, T, B>, ChatPromptTemplate, MessagesPlaceholder, FewShotChatTemplate, LengthBasedSelector / SemanticSimilaritySelector |
atomr-agents-agent |
Agent<I, T, Ms, Sk> actor + per-turn pipeline, tool-call loop with parallel dispatch, AgentMiddleware (logging / retry / rate-limit / redaction / tool-error-recovery), InferenceClient adapter for any ModelRunner |
atomr-agents-workflow |
DAG primitives, WorkflowRunner, StatefulRunner (channelled state), Interruptible (interrupt() + interrupt_before / _after + Command::{Continue, Resume, Update, Goto}), Subgraph, dispatch_fan_out (Send-API analogue) |
atomr-agents-harness |
Harness<L, T> actor, LoopStrategy / TerminationStrategy, durable iteration log; Harness is itself a Callable |
atomr-agents-org |
Org / Department / Team, OrgRoutingStrategy impls (RoundRobin / LoadAware / CapabilityMatch), Policy::narrow, NamespacedMemory (read-cascade + write-gating), swarm_loop helper |
atomr-agents-registry |
Versioned artifact registry with (kind, id, version) keys + publish_gated for eval-regression blocking |
atomr-agents-eval |
EvalSuite, Scorer (Contains / Equality / Regex / LlmJudgeScorer / RubricScorer / PairwiseScorer), RegressionGate, AnnotationQueue |
atomr-agents-cache |
LlmCache trait + InMemoryLlmCache + SemanticLlmCache (cosine match on prompt embedding); SQLite/Redis backend stubs behind features |
atomr-agents-parser |
Parser<T> trait, JsonParser / JsonSchemaParser / SchemaParser<T> / EnumParser / CommaListParser / XmlParser / YamlParser, OutputFixingParser, RetryWithErrorParser, StreamingPartialJsonParser |
atomr-agents-py-bindings |
atomr_agents._native PyO3 module — Event / EventBus / Registry exposed to Python |
atomr-agents-cli |
atomr-agents binary with eval / registry / harness / serve (Studio-style read+resume inspector) subcommands |
atomr-agents-testkit |
Test fakes: MockInference (wraps atomr-infer's MockRunner), deterministic strategies, in-memory stores, replay harness |
Plus a Python facade — pip install atomr-agents — that exposes the
host-mode Registry / EventBus and the guest-mode @tool /
@strategy / @persona decorators.
Quick start (Rust)
The umbrella crate is published on crates.io as atomr-agents:
[dependencies]
atomr-agents = { version = "0.1", features = ["agent", "harness", "eval"] }
atomr-infer = { version = "0.4", features = ["openai"] } # or any provider
A minimal agent against MockRunner (good for tests; swap for any
ModelRunner in production):
use std::sync::Arc;
use atomr_agents::prelude::*;
use atomr_agents::agent::{Agent, AgentBudgets, InferenceClient, LocalRunnerClient, Provider};
use atomr_agents::tool::{StaticToolStrategy, DynTool};
use atomr_agents::memory::{InMemoryStore, RecencyMemoryStrategy};
use atomr_agents::skill::StaticSkillStrategy;
use atomr_agents::persona::StaticPersonaStrategy;
use atomr_agents::instruction::{
ComposedInstructionStrategy, StaticBehaviorStrategy, StaticTaskStrategy,
};
use atomr_agents::observability::EventBus;
use atomr_infer_testkit::{MockRunner, MockScript};
let runner = MockRunner::new(MockScript::from_text(["the answer is ", "42"]));
let inference: Arc<dyn InferenceClient> =
Arc::new(LocalRunnerClient::new(runner, Provider::OpenAi));
let agent = Agent {
id: AgentId::from("a-1"),
model: "mock".into(),
instructions: ComposedInstructionStrategy::new(
StaticPersonaStrategy::new("You are a helpful assistant."),
StaticTaskStrategy("Answer arithmetic questions.".into()),
StaticBehaviorStrategy("Reply tersely.".into()),
),
tools: StaticToolStrategy::new(Vec::<DynTool>::new()),
memory: RecencyMemoryStrategy::new(Arc::new(InMemoryStore::new()), 5, 30),
skills: StaticSkillStrategy::new(vec![]),
inference,
bus: EventBus::new(),
max_tool_iterations: 3,
};
let r = agent
.run_turn("what's 1+2".into(), AgentBudgets::default())
.await?;
println!("{}", r.text);
Add tools, switch the MockRunner to a real ModelRunner (OpenAI,
Anthropic, vLLM, …), and the same code runs unchanged.
Quick start (Python)
pip install atomr-agents
from atomr_agents import EventBus, Registry
bus = EventBus()
bus.subscribe(lambda ev: print(ev.kind, ev.timestamp_ms))
registry = Registry()
registry.publish("tool_set", "ts", "0.1.0", {"tools": ["calc"]})
print(registry.latest("tool_set", "ts"))
See docs/python.md for the full host/guest model and the
subinterpreter-pool dispatcher pattern inherited from atomr's pycore.
Documentation map
docs/index.md— documentation hubdocs/architecture.md— runtime layout, crate stack, where each layer slots indocs/state-and-checkpointing.md— channels, reducers,Checkpointer, fork/replaydocs/agent-pipeline.md— the per-turn pipeline + tool-call loop + middlewaredocs/workflows-and-hitl.md— DAG, Send-API, dynamic interrupts, breakpointsdocs/retrieval-and-ingestion.md— retriever zoo,LongStore, loaders, splittersdocs/observability.md—EventBus,RunTree, tracersdocs/eval.md— eval suites, judge / pairwise / rubric scorers, regression gatedocs/multi-agent-patterns.md— supervisor / swarm / network / hierarchicaldocs/feature-matrix.md— every feature flag, what it pulls indocs/python.md— Python bindings + subinterpreter-pool guest modedocs/migrating-from-langgraph.md— concept-mapping table + concrete code translationsai-skills/— Claude Code / Agent SDK skills for AI-assisted coding against atomr-agents
License
Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atomr_agents-0.1.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: atomr_agents-0.1.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 261.7 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca67af88c06860150a1df6c9a79f96df2791222b374fdd9fe7613cb0fcf3d6a
|
|
| MD5 |
4cd48d8d94c554f0759655fe793fb55d
|
|
| BLAKE2b-256 |
3e813aa2ca358f0f08e3e89f4af605ec7d4456e64e380ee51684b20b0286024e
|
Provenance
The following attestation bundles were made for atomr_agents-0.1.0-cp311-cp311-win_amd64.whl:
Publisher:
release.yml on rustakka/atomr-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atomr_agents-0.1.0-cp311-cp311-win_amd64.whl -
Subject digest:
9ca67af88c06860150a1df6c9a79f96df2791222b374fdd9fe7613cb0fcf3d6a - Sigstore transparency entry: 1438957022
- Sigstore integration time:
-
Permalink:
rustakka/atomr-agents@a5e98d98eedf9a9ea3be18aef16b309d5eef5207 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rustakka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a5e98d98eedf9a9ea3be18aef16b309d5eef5207 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file atomr_agents-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: atomr_agents-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 397.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c51c44acc023cefd039446f9222737171d7db2d403e6f6f5c0ab727c9e12eb8c
|
|
| MD5 |
76bde7932da29df549a8d794eb9562b1
|
|
| BLAKE2b-256 |
20e652deecc38c8439dcf8bcd31598e9af8177bdc5727fb3ab54768753967100
|
Provenance
The following attestation bundles were made for atomr_agents-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl:
Publisher:
release.yml on rustakka/atomr-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atomr_agents-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl -
Subject digest:
c51c44acc023cefd039446f9222737171d7db2d403e6f6f5c0ab727c9e12eb8c - Sigstore transparency entry: 1438957038
- Sigstore integration time:
-
Permalink:
rustakka/atomr-agents@a5e98d98eedf9a9ea3be18aef16b309d5eef5207 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rustakka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a5e98d98eedf9a9ea3be18aef16b309d5eef5207 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file atomr_agents-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: atomr_agents-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 354.3 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
854df6cebd987443263979d35ec605be804d770c3b8d4e347ab919c86f5606a7
|
|
| MD5 |
f67fd87d8451cda3472d13da3fc9f842
|
|
| BLAKE2b-256 |
bf3c8083d8881f08549e11301c0e2b68830d92b044e3b425700d1d9c4b482884
|
Provenance
The following attestation bundles were made for atomr_agents-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:
Publisher:
release.yml on rustakka/atomr-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atomr_agents-0.1.0-cp311-cp311-macosx_11_0_arm64.whl -
Subject digest:
854df6cebd987443263979d35ec605be804d770c3b8d4e347ab919c86f5606a7 - Sigstore transparency entry: 1438957031
- Sigstore integration time:
-
Permalink:
rustakka/atomr-agents@a5e98d98eedf9a9ea3be18aef16b309d5eef5207 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rustakka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a5e98d98eedf9a9ea3be18aef16b309d5eef5207 -
Trigger Event:
workflow_dispatch
-
Statement type: