Skip to main content

Crate agent_framework_core

Crate agent_framework_core 

Source
Expand description

§agent-framework-core

Core abstractions for agent-framework-rs, a Rust implementation of the Microsoft Agent Framework. This crate provides the building blocks:

§Example

use agent_framework_core::prelude::*;
let agent = Agent::builder(client)
    .name("assistant")
    .instructions("You are a helpful assistant.")
    .build();

let response = agent.run_once("Hello!").await?;
println!("{}", response.text());

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

agent
Agents: the SupportsAgentRun trait and the concrete Agent.
client
The chat client trait and the automatic function-invocation loop.
compaction
Conversation-history compaction.
error
Error types for the agent framework.
history
Conversation-history context providers.
memory
Context / memory providers.
middleware
Middleware pipelines for agents, chat clients, and function invocation.
observability
Lightweight OpenTelemetry GenAI-style span instrumentation, built on the tracing crate, plus optional GenAI metrics behind the otel-metrics feature.
prelude
Commonly used imports.
session
Conversation sessions.
settings
Lightweight settings helpers: a secret-masking string newtype and a precedence-based value loader.
skills
Skills: progressive-disclosure capability packages.
streaming
Utilities for decoding streamed bytes.
tools
Tools: executable functions and hosted-tool markers.
types
Core data model: content, messages, responses, and options.
workflow
Graph-based multi-agent workflow orchestration.