FAQ
Short answers to common questions about troupekit 0.4. Most of them link to the page with the full story.
Is troupekit on crates.io?
Yes, since 0.3.1. Add it with cargo add troupekit; Install shows the features. To try unreleased changes, you can depend on the main branch in git instead.
Can I run an agent with no network?
Yes, with the llama feature. Give the agent a local model with .local(..) and leave out .model(..). Also set .private(true) to keep model and embedder requests on the device: build then refuses an agent with no on-device model, a cloud embedder, a cloud judge, and any tool that uses the network. If you also set a cloud .model(..), the route never calls it. The network tools are web_fetch, web_search, HTTP tools, hosted tools and tools that report uses_network. A tool you write counts as local unless it reports that. Local models and routing has the details.
Can I test an agent without an API key?
Yes. .model_client(m) serves the model selector from any Arc<dyn Model>, such as the scripted FnModel in troupekit_graph::testing, which answers however your test tells it to. It needs no key and no network, and many of the tests quoted on this site use it. Agents and personas shows one.
Where does my data go?
Into the stores you choose. By default the five stores live in memory and nothing survives a restart. Troupe::builder().sqlite(path) or Storage::sqlite(path) keeps them in one SQLite file on your disk, encrypted with the sqlcipher feature and a key. Model calls go to the vendor of the selector you set, embeddings to the embedder's vendor, and web tools to the pages and search services they call. See Memory and storage.
Does a crash lose a run?
Not if the checkpoints are in SQLite. BuiltAgent::resume(run_id) and BuiltGraph::resume(run_id) continue from the latest checkpoint, also from a new process. With the default in-memory storage, a crash does lose the run. Kill and resume a workflow shows a resume after SIGKILL.
Are API keys logged?
Not the agent's model API key. It never appears in Debug output or an error, and tracing scrubs it from every span, whether or not content is kept. Other secrets, such as a key a tool reads or one held only by a custom model client, are not scrubbed. A span's error message is written whether or not content is kept, so keep such secrets out of error messages. See Models and providers and Tracing and budgets.
Can a web page or document steer my agent?
It can try. Fetched pages, search results and knowledge chunks are fenced as untrusted text before the model sees them, and the built-in personas tell the model to treat them as data. Fencing lowers the risk, but it does not remove it, because the model still reads the text. Keep tools with side effects narrow, so a model that is fooled cannot do much harm.
How do I cap spend?
You have three places to set a cap: Limits on the agent or graph, a budget in the persona, or [budget] cloud_usd_per_day in a route policy. Tracing and budgets explains how they combine.
Can I call troupekit from Swift, Kotlin or Python?
Yes, from source. Version 0.4 has Swift and Kotlin bindings for iOS and Android apps, and Python bindings, but no SPM, Maven or PyPI package yet. Build them from a clone of the repository with cargo xtask build-xcframework, cargo xtask build-aar and cargo xtask build-wheel; install the wheel with pip.
Does troupekit support MCP?
Not yet. Version 0.6 adds MCP tools, and lets you expose troupekit as an MCP server.