Expand description
agent-core — the unified agent runtime.
It wraps the codex harness-style agent loop and guarantees the context
contract: every Agent::run first recalls
context from the store (vector/semantic recall — see context::embed), then
after producing a reply memorizes
both the user turn and the assistant reply. Tool execution is isolated in a
Sandbox.
The store itself is an implementation detail: the cloud uses Postgres +
pgvector, the on-device SDK uses the embedded store. The contract lives in
context.
The LLM is accessed through ModelClient; a deterministic StubModel
is the default so the runtime is runnable without an API key. Enable the
openai feature to use the real OpenAI Responses/Chat API.
Modules§
- context
- Context memory contract shared by every runtime tier.
Structs§
- Agent
- The unified agent. Holds the model client, context store and sandbox.
- Agent
Config - Configuration for constructing an
Agent. Serializable for SDK/Ffi. - Model
Request - A single model request.
- Model
Response - A single model response.
- Model
Turn - A model reply that may request one or more tool calls (agentic loop).
- Stub
Model - Deterministic stand-in used when no API key /
openaifeature is present. - Tool
- A tool the agent may invoke during an agentic turn.
- Tool
Call - A request from the model to invoke a tool.
- Tool
Result - The outcome of executing a tool, fed back to the model.
Enums§
- Agent
Event - Events emitted by
Agent::run_event_streamso callers can render a live agentic turn: phase boundaries, tool calls (with their results), streamed tokens, and the terminalDone. - Core
Error
Traits§
- Model
Client - LLM access seam. Implement this to plug in any backend.
Functions§
- default_
sandbox_ box - Re-export the default sandbox constructor for callers that don’t need config.
- in_
memory_ context - Convenience: an in-process context store for quick local use.