1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
This guide shows how to add Bake Agent Context tasks to a Rust project and install context from its Cargo dependencies.
Bake tasks belong in your project's private `bake/` crate. Add the Bake task library and Bake Agent Context to `bake/Cargo.toml`:
```toml
[dependencies]
bake = { package = "socketry-bake", version = "0.2" }
bake-agent-context = "0.1"
```
Link the task library from `bake/src/main.rs` and run the discovered task registry:
```rust,ignore
use bake_agent_context as _;
fn main() -> bake::Result<()> {
}
```
Run this from the project root:
```sh
cargo bake agent:context:install
```
The task scans resolved Cargo dependencies for a top-level `context/` directory, copies each provider's files into `.agents/context/`, and updates the Context section of `agents.md`.
Use `cargo bake agent:context:list` to see which dependencies provide context. Install one provider with `cargo bake agent:context:install --package CRATE`, or inspect one of its files with `cargo bake agent:context:show --package CRATE --file getting-started`.
`.agents/context/` is a generated cache and can be excluded from version control. The lower-case `agents.md` file is the project-facing guide index; review it and commit it with the project.