Choose a crate
Myco's workspace has three packages. Start with the smallest one that owns the behavior you need:
| You want to… | Use | Bring yourself |
|---|---|---|
| Call a model and consume streamed responses | myco-model | Endpoint, credentials, model settings, messages, retry policy |
| Run a model/tool loop without the server | myco-agent | A GenerativeModel, ToolExecutor, event sink, input, persistence |
| Reuse Myco's hosts, sessions, and tool services | myco | Application startup and resource ownership |
Dependencies flow from the application to myco-agent, then to myco-model.
Neither lower crate depends on the application. You do not need SSH, terminal
rendering, a Myco profile, or a session store to embed the agent.
Use the workspace or a registry release
Within a checkout, examples use the local packages:
cargo run --locked -p myco-agent --example headless
In another project, select a published version available for both libraries:
[dependencies]
myco-model = "0.3"
myco-agent = "0.3"
tokio = { version = "1", features = ["macros", "rt"] }
The example sources also use futures and serde_json; include those when
copying the examples. To try unreleased changes, use path dependencies to
crates/myco-model and crates/myco-agent in the same checkout, or Git
dependencies pinned to the same commit.
These are evolving APIs. Workspace packages share a version and the agent pins its model dependency exactly. Keep both libraries on a compatible release or the same source revision. This site's API reference is built from the same commit as the guide.
A useful reading order
- Inference: messages, stream events, and one-attempt drivers.
- Agents: tool execution, history, cancellation, and checkpoints.
- Application architecture: session and host composition.
- Evaluations: a reserved home for the future eval workflow.