Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2d1c7f3
chore: files changed vendor/tinyinference
senamakel Aug 31, 2026
4bf2e92
chore: files changed README.md
senamakel Aug 31, 2026
1a5210d
chore: files changed docs/spec/README.md
senamakel Aug 31, 2026
71ea241
docs(readme): fold openai_chat commands into example prose
senamakel Aug 31, 2026
066ea21
docs(readme): consolidate example descriptions and API key note
senamakel Aug 31, 2026
1a9f89c
chore: files changed docs/modules/expressive-language/reference.md
senamakel Aug 31, 2026
6e33aad
chore: files changed CONTRIBUTING.md,docs/modules/expressive-language…
senamakel Aug 31, 2026
7ac72b7
chore: files changed docs/modules/expressive-language/README.md
senamakel Aug 31, 2026
a12b051
chore: files changed SECURITY.md
senamakel Aug 31, 2026
09d9d4d
chore: files changed SECURITY.md
senamakel Aug 31, 2026
3b1475a
chore: files changed ROADMAP.md
senamakel Aug 31, 2026
559a417
chore: files changed ROADMAP.md
senamakel Aug 31, 2026
e500aa1
chore: files changed docs/modules/harness/local-models.md
senamakel Aug 31, 2026
394daf9
chore: files changed AGENTS.md,CLAUDE.md
senamakel Aug 31, 2026
ef19bca
chore: files changed AGENTS.md,CLAUDE.md
senamakel Aug 31, 2026
cbb9929
chore: files changed wiki
senamakel Aug 31, 2026
021d2a4
fix: restore CLAUDE.md symlink to AGENTS.md
senamakel Aug 31, 2026
161abcb
chore: files changed crates/tinyagents-integration-tests/examples/_re…
senamakel Aug 31, 2026
90f5a75
chore: files changed crates/tinyagents-integration-tests/examples/_re…
senamakel Aug 31, 2026
d25a78e
chore: files changed README.md,crates/tinyagents-integration-tests/ex…
senamakel Aug 31, 2026
f537bc8
chore: files changed vendor/tinyinference
senamakel Aug 31, 2026
0d549d9
chore: files changed .gitmodules
senamakel Aug 31, 2026
4d43f2c
docs(readme): add tinyinference dependency to setup example
senamakel Aug 31, 2026
397792e
Merge upstream/main into docs-minimal-harness
senamakel Aug 31, 2026
6462f6f
chore: files changed crates/tinyagents-integration-tests/examples/_re…
senamakel Aug 31, 2026
68c007c
chore: files changed crates/tinyagents-integration-tests/examples/_re…
senamakel Aug 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
url = https://github.com/tinyhumansai/tinytools.git
[submodule "vendor/tinyinference"]
path = vendor/tinyinference
url = git@github.com:tinyhumansai/tinyinference.git
url = https://github.com/tinyhumansai/tinyinference.git
2 changes: 0 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ declarative `.rag` blueprint format), `crates/tinyagents-registry/` (the named
capability catalog), and `crates/tinyagents-session/` (durable session data).
`crates/tinyagents-tracing/` supplies shared opt-in tracing macros, while
`crates/tinyagents-integration-tests/` owns cross-crate tests and examples.
Scripted, interpreter-backed orchestration (a CodeAct/REPL loop) is a host
concern and is deliberately not implemented here.

Prefer small, focused modules that do one thing extremely well. New feature
areas should live in module directories instead of accumulating broad,
Expand Down
24 changes: 13 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ Install a stable Rust toolchain with Rust 2024 support, then run:

```sh
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo build --all-targets
cargo test
cargo clippy --workspace --all-targets -- -D warnings
cargo build --workspace --all-targets
cargo test --workspace
```

The bundled example should also run:

```sh
cargo run --example basic_graph
cargo run -p tinyagents-integration-tests --example basic_graph
```

To build with the optional embedded SQLite checkpointer or the `.ragsh` Rhai
session runtime, enable the relevant feature:
Cargo features are package-local. `tinyagents-harness` exposes `sqlite`,
`tools`, `multimodal`, and `tracing`; `tinyagents-graph` exposes `sqlite` and
`tracing`; `tinyagents-registry` and `tinyagents-session` expose `tracing`.
To build with a feature enabled, pass it on the relevant package:

```sh
cargo test --features sqlite
cargo test --features repl
cargo test -p tinyagents-harness --features sqlite
cargo test -p tinyagents-integration-tests --features sqlite
```

### Submodules
Expand Down Expand Up @@ -74,9 +76,9 @@ module-local unit tests in `test.rs`. Integration tests belong in `tests/`.
Before opening a pull request:

- run `cargo fmt --check`
- run `cargo clippy --all-targets -- -D warnings`
- run `cargo build --all-targets`
- run `cargo test`
- run `cargo clippy --workspace --all-targets -- -D warnings`
- run `cargo build --workspace --all-targets`
- run `cargo test --workspace`
- add or update tests for behavior changes
- update docs when public APIs, architecture, or examples change
- keep the PR focused on one logical change
Expand Down
419 changes: 164 additions & 255 deletions README.md

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Roadmap

TinyAgents is at v1.5.0. The roadmap favors small, well-tested modules that
TinyAgents is at v2.1.2. The roadmap favors small, well-tested modules that
build toward a production-grade Rust agent runtime.

## Shipped Foundation
Expand All @@ -17,15 +17,12 @@ build toward a production-grade Rust agent runtime.
middleware, policy) bound by name (`registry/`)
- the declarative `.rag` blueprint language: lexer, parser, compiler, and
registry-backed binding (`language/`)
- the imperative `.ragsh` REPL language for capability-bound interactive
orchestration (`repl/`)
- an optional SQLite-backed checkpointer (`sqlite` feature) and an optional
Rhai-backed `.ragsh` session runtime (`repl` feature)
- an optional SQLite-backed checkpointer (`sqlite` feature)
- an embedded Langfuse client and graph exporter for observability

## Near-Term Work

- broaden `.rag`/`.ragsh` example coverage for less-common routing and
- broaden `.rag` example coverage for less-common routing and
parallel-fanout shapes
- continue splitting any module or doc that grows past the 500-line limit
into focused files
Expand Down
6 changes: 3 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Report concerns to `contact@tinyhumans.ai`.

## Supported Versions

TinyAgents is pre-1.0. Security fixes target the `main` branch until the project
starts maintaining release branches.
Security fixes target the `main` branch until the project starts maintaining
release branches.

## Reporting A Vulnerability

Expand All @@ -31,7 +31,7 @@ before publishing details.

Examples of in-scope issues:

- generated `.rag` or `.ragsh` source bypassing registry or policy checks
- generated `.rag` source bypassing registry or policy checks
- unintended tool, model, store, or filesystem access
- unsafe handling of credentials or secrets
- prompt/context leakage across runs, forks, or sub-agents
Expand Down
12 changes: 5 additions & 7 deletions docs/modules/expressive-language/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ become
registry binding, policy checks, and graph compiler as a human-authored file.
Generated topology must never be installed directly into the runtime.

This module is intentionally declarative. Interactive scripting and
CodeAct-style recursive execution are host concerns and are not implemented in
this crate. A `.rag` file defines graph topology and bindings; a host session
inspects, scripts, and orchestrates harness or graph calls through
capability-bound functions of its own.
This module is intentionally declarative. Interactive scripting is a host
concern and is not implemented in this crate. A `.rag` file defines graph
topology and bindings; a host session inspects, scripts, and orchestrates
harness or graph calls through capability-bound functions of its own.

For what the parser/compiler implement today versus what is still aspirational,
see [Implementation status](implementation-status.md).
Expand Down Expand Up @@ -111,8 +110,7 @@ The docs can still describe the language as TinyAgents source.
## Expressiveness Targets

The long-term language should cover the graph concepts proven useful in
LangGraph, LangChain agent graphs, OpenHuman's state-machine harness, and CodeAct
style orchestration:
LangGraph, LangChain agent graphs, and OpenHuman's state-machine harness:

- graph defaults: recursion limits, timeouts, checkpointing, durability,
streaming modes, cache policy, steering policy, and concurrency
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/expressive-language/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ node, where the policy is actually attached to the run's `SteeringHandle`.

### `repl_agent`

Runs a host-provided script or model-driven CodeAct loop, bound by name to a
registered `Script` component. The node implementation is supplied by the host;
this crate ships no interpreter.
Runs a host-provided script node, bound by name to a registered `Script`
component. The node implementation is supplied by the host; this crate ships
no interpreter.

Supported fields:

Expand Down
5 changes: 3 additions & 2 deletions docs/modules/harness/local-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ that works in development and stalls in production.

This page documents what actually differs, what the crate already handles, and
what a caller still has to configure. Everything here is asserted by
[`tests/live_local_models.rs`](../../../tests/live_local_models.rs) and
[`tests/live_local_embeddings.rs`](../../../tests/live_local_embeddings.rs)
[`tests/live_local_models.rs`](../../../crates/tinyagents-integration-tests/tests/live_local_models.rs)
and
[`tests/live_local_embeddings.rs`](../../../crates/tinyagents-integration-tests/tests/live_local_embeddings.rs)
against real servers.

## Presets
Expand Down
58 changes: 13 additions & 45 deletions docs/spec/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
# TinyAgents System Specification

TinyAgents is a Rust-native LLM application framework inspired by LangChain and
LangGraph. The system is organized as focused crates for five public surfaces:
TinyAgents is a small, provider-neutral agent harness for Rust, plus a durable
typed state-graph runtime. It takes its shape from LangChain (models, tools,
middleware, structured output, streaming, usage/cost) and LangGraph
(`START`/`END`, nodes, conditional edges, channels/reducers, checkpoints,
interrupts, subgraphs, time travel) — rebuilt as ordinary, typed Rust. The
system is organized as five public crates:

1. the harness
2. the graph
3. the registry
4. the expressive language
5. durable sessions

Scripted, interpreter-backed orchestration (a CodeAct/REPL loop over
model-written code cells) is deliberately a *host* concern built on top of these
crates, not a surface this workspace ships. See "Host-side surfaces" below.

The goal is to make agent systems easy to define, inspect, run, test, and
eventually serialize without hiding the Rust types that make production systems
reliable.
serialize without hiding the Rust types that make production systems reliable.

## Reference Positioning

TinyAgents should synthesize the reference systems rather than clone any one of
them:
TinyAgents synthesizes the reference systems rather than cloning either one:

- LangGraph contributes the durable execution model: explicit state graphs,
virtual `START` and `END`, Pregel-style supersteps, reducers/channels,
Expand All @@ -29,42 +27,12 @@ them:
- LangChain contributes the harness model: provider-neutral models, tools,
middleware, runtime context, memory, retrieval, structured output, tracing,
usage, cost, and conformance tests for integrations.
- `rust-langgraph` shows the Rust-facing precedent for a stateful graph runtime
with nodes, conditional edges, checkpoints, streaming, optional model
adapters, and ReAct/tool helpers. TinyAgents should go deeper on typed state,
harness composition, registries, and language-backed graph definitions.
- OpenHuman PR #4261 contributes the closest product-shaped precedent: a
harness-decoupled graph engine, persistent checkpoints, HITL, graph
observability, blueprints, JSON-RPC run control, and a behavior-preserving
cutover from an implicit turn loop to an explicit phase machine.
- CodeAct/recursive-language-model runtimes contribute the recursion model:
context and prompts as runtime values, recursive sub-model or sub-agent calls
as functions, persistent session variables, and trajectory logging. TinyAgents
provides the primitives (registry capabilities, sub-agents, session/cell/call
ids, event journals); the interpreter and its sandbox stay host-side.

The target architecture is therefore layered: the harness owns model/tool
execution and policies, the graph owns deterministic state transition and
durability, the registry owns named capabilities, and `.rag` owns serializable
graph blueprints. No layer should bypass another layer's safety, policy,
observability, or test contracts.

## Host-side surfaces

Some things a recursive agent system needs are intentionally *not* implemented
here, because a host can implement them on top of the four modules and because
shipping them would drag an embedded interpreter into every dependent's build:

- the scripted CodeAct/REPL session loop (an embedded Rhai / Python / JavaScript
interpreter running model-written code cells)
- the driver loop that prompts a model for the next code cell and feeds the
cell's output back in

What these crates provide for those hosts: the capability `registry` (so a script
can only reach named `llm` / `tool` / `agent` capabilities), the harness and its
sub-agent recursion accounting, typed `SessionId` / `CellId` / `CallId`, the
event journal, and the `.rag` `repl_agent` node kind, which binds a
host-provided scripted node to a registered `Script` component by name.
The target architecture is layered: the harness owns model/tool execution and
policies, the graph owns deterministic state transition and durability, the
registry owns named capabilities, and `.rag` owns serializable graph
blueprints. No layer should bypass another layer's safety, policy,
observability, or test contracts.

## Detailed Module Docs

Expand Down
2 changes: 1 addition & 1 deletion wiki
Submodule wiki updated from b02f58 to 5b8f59