Skip to main content

systemprompt_agent/
lib.rs

1//! # systemprompt-agent
2//!
3//! Agent-to-Agent (A2A) protocol implementation for systemprompt.io.
4//!
5//! This crate hosts the domain logic for hosting governed AI agents:
6//! - JSON-RPC protocol models in [`models::a2a`]
7//! - Persistence in [`repository`] (tasks, contexts, artifacts, execution
8//!   steps)
9//! - Runtime services in [`services`] (HTTP server, orchestration, MCP
10//!   bridging, skills ingestion, streaming, registry)
11//! - A typed error hierarchy rooted at [`AgentError`]
12//!
13//! ## Feature flags
14//!
15//! This crate currently has no Cargo features beyond defaults. Functionality
16//! is unconditional and the crate compiles a single configuration. The facade
17//! crate `systemprompt` gates inclusion via the `agent`/`full` features.
18//!
19//! ## Layer
20//!
21//! Domain layer. Depends only on `shared/*` and `infra/*` crates plus a small
22//! number of sibling domain crates (declared in `Cargo.toml`).
23//!
24//! Copyright (c) systemprompt.io — Business Source License 1.1.
25//! See <https://systemprompt.io> for licensing details.
26
27pub(crate) mod error;
28pub(crate) mod extension;
29pub mod models;
30pub mod repository;
31pub mod services;
32pub(crate) mod state;
33
34pub use extension::AgentExtension;
35
36pub use state::AgentState;
37
38pub use models::a2a::{
39    A2aJsonRpcRequest, A2aRequestParams, A2aResponse, AgentCapabilities, AgentCard, AgentInterface,
40    AgentProvider, AgentSkill, Artifact, DataPart, Message, MessageSendParams, Part,
41    SecurityScheme, Task, TaskIdParams, TaskQueryParams, TaskState, TaskStatus, TextPart,
42    TransportProtocol,
43};
44
45pub use error::{
46    AgentError, AgentResult, ArtifactError, ContextError, ProtocolError, RowParseError, TaskError,
47};
48
49pub const A2A_PROTOCOL_VERSION: &str = "0.3.0";
50
51pub use services::{
52    AgentEvent, AgentEventBus, AgentHandlerState, AgentOrchestrator, AgentServer, AgentStatus,
53    ContextService, SkillService,
54};
55
56pub use repository::content::ArtifactRepository;