1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! HTTP server and AG-UI protocol support for mixtape agents.
//!
//! This crate provides HTTP endpoints for running mixtape agents via web services,
//! with optional support for the AG-UI protocol used by CopilotKit.
//!
//! # Features
//!
//! - `agui` - Enable AG-UI protocol support for CopilotKit integration
//!
//! # Example
//!
//! ```rust,no_run
//! use mixtape_server::MixtapeRouter;
//! use mixtape_core::Agent;
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Create your agent (requires provider feature in mixtape-core)
//! # let agent: Agent = todo!();
//!
//! // Build the router with AG-UI support
//! let app = MixtapeRouter::new(agent)
//! .with_agui("/api/copilotkit")
//! .build()?;
//!
//! // Serve with axum
//! let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?;
//! axum::serve(listener, app).await?;
//! # Ok(())
//! # }
//! ```
pub
pub
// Re-exports
pub use ;
pub use MixtapeRouter;
// AG-UI protocol types (for consumers who need to reference the event types)
pub use ;