Skip to content

Thinking in PromptFleet

PromptFleet Agents is a Rust workspace of 25 crates designed around three principles: dual-target builds, crate composition, and feature-flag opt-in. Understanding these principles will help you make the right choices when building agents.

Every agent you build from agent_sdk can compile to two targets from the same source:

TargetRuntimeUse case
wasm32-wasip1 (WASI Preview 1)Spin locally or SpinKube on Kubernetes (serverless; ~4.8 ms cold start, ~0.6 MB/agent)Run spin up for dev/CI; deploy the same WASM to SpinKube in production
Native (x86_64 / aarch64)Tokio + AxumLocal development, testing, sub-agent delegation, AG-UI streaming

The SDK uses cfg(target_arch = "wasm32") gates internally so your agent code stays the same — only the entry point and async runtime change. On WASM (wasm32-wasip1), Spin SDK provides the HTTP listener and async executor. On native, Tokio and Axum take over.

The 25 crates are organized into five groups. You compose an agent by pulling in the groups you need — nothing is forced on you.

SDK / Core

agent_sdk · agent_core · pf_macros · pf-types · pf_config

The runtime foundation: agent types, builder, skills, config loading, and proc-macros for wiring.

A2A Protocol

protocol_transport_core · a2a_protocol_core · a2a_http_client · a2a_http_server · a2a_app_ports · a2a_rpc_macros

Google’s Agent-to-Agent protocol: JSON-RPC 2.0 types, HTTP dispatch, streaming SSE, clean-architecture ports.

LLM

llm_client · llm_context_core · llm_tools · llm_tool_macros · tool_web_search

Provider-agnostic LLM client, token budgeting, tool registry with proc-macro, and reusable tool crates.

Observability

observability · observability_core · structured_logging · otel · prometheus

Facade pattern: one entrypoint, pluggable OpenTelemetry and Prometheus backends, structured logging.

Support / Integration

foundation_utils · mcp_protocol · pf_test_harness · umao_agents

RAII utilities, MCP protocol support, native test harness for streaming/SSE, and UMAO multi-agent coordination.

See the Architecture page for the full dependency diagram.

By default, agent_sdk gives you only agent-core — the protocol-agnostic runtime types. Everything else is opt-in via Cargo features. This keeps your WASM binary small and your compile times fast.

These are the individual building blocks:

FeatureWhat it enables
agent-coreProtocol-agnostic agent domain types (default)
a2a-serverA2A HTTP server — Spin on WASM, Axum on native
a2a-clientA2A HTTP client — Spin on WASM, Reqwest on native
llm-engineProvider-agnostic LLM orchestration with tool registry
context-windowToken budgeting and history strategies via llm_context_core
event-streamNative SSE streaming for A2A and AG-UI (native only)
agui-streamAG-UI stream surface on top of event-stream (native only)
sub-agentsSub-agent delegation tools (native only)
mcp-clientMCP tool integration — rmcp on native, mcp_protocol on WASM
config-loaderJSON + env config loading via pf_config
agent-observabilityObservability facade with optional OTEL
redis-storageRedis/Valkey shared task storage (native only)
a2a-toolsA2A agent discovery and messaging exposed as LLM tools
interactive-toolsTyped interaction contracts (ask-question, confirmation flows)

Presets compose primitives into common profiles so you don’t need to list features one by one:

PresetIncludesTypical use
a2a-agentagent-core + llm-engine + a2a-server + a2a-client + event-streamA2A-capable interoperable agent
agui-agentagent-core + llm-engine + agui-streamUser-facing AG-UI agent
dual-agentagui-agent + a2a-agentBoth A2A and AG-UI in one runtime
pf-agentdual-agent + mcp-client + agent-observabilityFull PromptFleet opinionated bundle

A minimal A2A agent:

[dependencies]
agent_sdk = { package = "pf_agent_sdk", version = "0.1", features = ["a2a-agent"] }

The full platform bundle with observability and MCP:

[dependencies]
agent_sdk = { package = "pf_agent_sdk", version = "0.1", features = ["pf-agent"] }