Troupekit and CrewAI
CrewAI is a Python framework for role-based crews of agents and event-driven flows. We compared crewai at 1.15.45, checked on 2026-11-28, with the docs versioned inside its repository at that tag.
The same agent
The test agent is small on purpose: a persona, one tool, a run that is killed and resumed, and a spend cap.
In CrewAI
The persona is role, goal and backstory; this example from the agents page sets the first two (agents.mdx):
from crewai import Agent
from crewai_tools import SerperDevTool
# Create an agent
researcher = Agent(
role="AI Technology Researcher",
goal="Research the latest AI developments",
tools=[SerperDevTool()],
verbose=True
)
# Use kickoff() to interact directly with the agent
result = researcher.kickoff("What are the latest developments in language models?")
# Access the raw response
print(result.raw)
For a kill and resume, checkpoint=True on a crew writes a JSON checkpoint per finished task, and a restore skips completed tasks (checkpointing.mdx). The task that was running starts again, unless you choose the finer llm_call_completed setting. From the tutorial (checkpointing.mdx):
from crewai import Agent, Crew, Task
researcher = Agent(role="Researcher", goal="Research", backstory="Expert")
writer = Agent(role="Writer", goal="Write", backstory="Expert")
crew = Crew(
agents=[researcher, writer],
tasks=[
Task(description="Research AI trends", agent=researcher, expected_output="bullets"),
Task(description="Write a summary", agent=writer, expected_output="paragraph"),
],
checkpoint=True,
)
from crewai import CheckpointConfig
result = crew.kickoff(
from_checkpoint=CheckpointConfig(
restore_from="./.checkpoints/<timestamp>_<uuid>.json",
),
)
There is no cap in money or tokens. An agent has max_iter (20 by default), max_rpm and max_execution_time (agents.mdx), and token usage is reported after the run.
In troupekit
The persona is the doc comment and the tool is a #[tool] function. This is the tool_agent example:
#![allow(unused)]
fn main() {
/// Adds numbers with the add tool.
#[agent(model = "openai/gpt-6-luna", tools = [add])]
fn calc() {}
}
A role, a goal, evals, a spend cap of 5 000 millionths of a dollar per run and the checkpoint store are keys on the same macro. This one is from a test of the kit:
#![allow(unused)]
fn main() {
#[agent(
model = "fake/m",
role = "Checks facts.",
goal = "A short answer.",
display_name = "Fact Checker",
evals = ["min_items(items, 1)"],
limits = Limits { run: Some(5_000), ..Limits::default() },
checkpoints = Storage::memory(),
max_turns = 3,
max_tokens = 256,
retries = 1,
laws = "tests/fixtures/rules.bend",
auto_laws = false,
)]
}
In 0.4 the laws key is validated at build and not enforced by the run (Proofs and laws). With the SQLite store as checkpoints, a new process resumes a killed run by its id. This is the kill_model_call example, which is killed in the middle of a local model call:
#![allow(unused)]
fn main() {
("resume", Some(id)) => {
let run_id: RunId = serde_json::from_str(&format!("\"{id}\""))?;
let text = built.resume(run_id).await?;
println!("RESUMED {}", text.len());
}
}
Nothing else is needed: no server, no second process to run the engine, no Python. Durable runs and Spend limits say what each part guarantees.
Side by side
| CrewAI 1.15.45 | Troupekit 0.4 | |
|---|---|---|
| Durability | A JSON or SQLite checkpoint per finished task by default, or per model call | Checkpoint after every step, each model call and each batch of tool calls, once checkpoints use Storage::sqlite; the default in-memory store is lost when the process exits |
| Spend limits | None; iteration, rate and time caps | USD per call, per run and per period, when you set them; checked before each call |
| Tracing | CrewAI AMP, which needs an account and crewai login (tracing.mdx) | Own tracer, JSONL and an HTML viewer |
| Evals | crewai test runs a crew and scores it; "For now, the only provider available is OpenAI" (testing.mdx) | Evals on the persona, checked on every run |
| Offline and on-device | Ollama (llms.mdx); no in-process model found | llama.cpp in process, Ollama, and a route policy per call |
| Mobile | None found | Builds for iOS and Android in CI; Swift and Kotlin bindings since 0.4, built from source |
| Single binary | Needs Python 3.10 to 3.13 (pyproject.toml) | Compiles into your program |
Where CrewAI is better
Role-based crews out of the box, with delegation, sequential and hierarchical processes, MCP tools and 86 tool pages in its docs at this tag, and crash resume with no database to set up. Troupekit's crew and team patterns come in 0.5.
Where troupekit is different
With Storage::sqlite checkpoints, the checkpoint is per step rather than per task, so less work repeats after a kill, and a money cap you set is checked before every call. Tracing needs no account, and the model can run in the same process.