Expand description
Context loaders for workspace-local agent instructions.
This crate discovers and loads AGENTS.md files (project-level
instructions) into agentkit_core::Items with ItemKind::Context. The
resulting items slot directly into a transcript alongside system, user, and
assistant messages, so the agent loop and providers do not need a separate
context path.
§Overview
AgentsMd– walks ancestor directories to findAGENTS.mdfiles.ContextLoader– combines multipleContextSourceimplementations and loads them in order.
§Example
use agentkit_context::{AgentsMd, ContextLoader};
let items = ContextLoader::new()
.with_source(AgentsMd::discover("."))
.load()
.await?;Structs§
- Agents
Md - Discovers and loads
AGENTS.mdfiles by walking ancestor directories. - Context
Loader - Composable loader that gathers context
Items from multipleContextSourceimplementations.
Enums§
- Agents
MdMode - Controls how many
AGENTS.mdfilesAgentsMdreturns during ancestor discovery. - Context
Error - Errors that can occur while discovering or reading context files.
Traits§
- Context
Source - A source of context
Items.