Skip to main content

Crate af_agent

Crate af_agent 

Source
Expand description

Stable Agent extension contracts: model, tools, inbox, and trusted plugins. The single executable loop lives in af-agent-runtime.

Re-exports§

pub use context::ContextAuthority;
pub use context::ContextContribution;
pub use context::ContextContributor;
pub use context::ContextRequest;
pub use inbox::Inbox;
pub use inbox::InboxError;
pub use inbox::InboxItem;
pub use model::ChatModel;
pub use model::ModelDescriptor;
pub use model::ModelRegistry;
pub use model::ModelRegistryError;
pub use plugin::mount_plugins;
pub use plugin::resolve_plugin_order;
pub use plugin::validate_plugin_references;
pub use plugin::AgentPlugin;
pub use plugin::AgentRegistrar;
pub use plugin::Hook;
pub use plugin::HookDecision;
pub use plugin::ModelFailure;
pub use plugin::ModelRequestPolicy;
pub use plugin::MountedPlugins;
pub use plugin::PluginCatalog;
pub use plugin::PluginDescriptor;
pub use plugin::PluginError;
pub use plugin::PluginLease;
pub use plugin::PluginManifest;
pub use plugin::PluginMountContext;
pub use plugin::PluginPermission;
pub use plugin::PluginReferenceIssue;
pub use plugin::PreStepDecision;
pub use plugin::RequestErrorAction;
pub use plugin::StepContext;
pub use plugin::ToolExecutionFuture;
pub use plugin::TurnStopDecision;
pub use prompt::PromptAuthority;
pub use prompt::PromptRegistry;
pub use prompt::PromptSection;
pub use tool::model_tool_name;
pub use tool::support as tool_support;
pub use tool::validate_json_schema;
pub use tool::validate_json_schema_definition;
pub use tool::validate_json_schema_value;
pub use tool::CancellationToken;
pub use tool::Tool;
pub use tool::ToolConcurrency;
pub use tool::ToolExecutionContext;
pub use tool::ToolMeta;
pub use tool::ToolRegistry;
pub use tool::ToolSurface;

Modules§

context
Per-step context contribution seam.
inbox
Pending-input queue and delivery modes.
model
The chat-model abstraction the agent loop runs against.
plugin
Trusted plugin lifecycle, hooks and registrar.
prompt
Deterministic prompt-section composition.
testing
Test doubles for the Agent seams: a scripted ChatModel that replays a queue of responses and records every request it received.
tool
Agent tools + registry. Port of the reusable shape of agent_core/tools/.

Structs§

RequestContext
Caller identity and ambient product policy resolved from transport metadata. It is deliberately absent from Agent and Docs request bodies.

Enums§

InteractionResolution
How the user resolved an interaction.