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:
types— the data model: messages, content, responses, options.client— theChatClienttrait and the automatic function-invocation loop.agent— theSupportsAgentRuntrait andAgent.compaction— conversation-history compaction strategies and theTokenizerabstraction.tools— executable tools and hosted-tool markers.session—AgentSession, a lightweight conversation identity + state container.history—HistoryProviders: conversation history as aContextProvider.memory— context / memory providers.middleware— agent, chat, and function middleware pipelines.observability— OpenTelemetry GenAI-styletracinginstrumentation.skills—Skillcapability packages, surfaced viaSkillsProvider, aContextProviderthat progressively discloses skill instructions and resources through framework-generated tools.settings— secret-maskingSecretStringand precedence-based setting resolution.workflow— graph-based multi-agent workflow orchestration.
§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§
Modules§
- agent
- Agents: the
SupportsAgentRuntrait and the concreteAgent. - 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
tracingcrate, plus optional GenAI metrics behind theotel-metricsfeature. - 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.