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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
//! # Bob Adapters
//!
//! Adapter implementations for the [Bob Agent Framework](https://github.com/longcipher/bob) ports.
//!
//! ## Overview
//!
//! This crate provides concrete implementations of the port traits defined in [`bob_core`]:
//!
//! - **LLM Adapters**: Connect to language models via various providers
//! - **Tool Adapters**: Integrate with external tools and MCP servers
//! - **Storage Adapters**: Persist session state
//! - **Observability Adapters**: Log and monitor agent events
//!
//! ## Features
//!
//! All adapters are feature-gated to minimize dependencies:
//!
//! - **`llm-genai`** (default): LLM adapter using the [`genai`](https://crates.io/crates/genai)
//! crate
//! - **`mcp-rmcp`** (default): Tool adapter for MCP servers via [`rmcp`](https://crates.io/crates/rmcp)
//! - **`skills-agent`** (default): Skill loading and composition via [`bob-skills`](https://crates.io/crates/bob-skills)
//! - **`store-memory`** (default): In-memory session storage
//! - **`observe-tracing`** (default): Event sink using [`tracing`](https://crates.io/crates/tracing)
//!
//! ## Example
//!
//! ```rust,ignore
//! use bob_adapters::{
//! llm_genai::GenAiLlmAdapter,
//! mcp_rmcp::McpToolAdapter,
//! store_memory::InMemorySessionStore,
//! observe::TracingEventSink,
//! };
//! use genai::Client;
//!
//! // LLM adapter
//! let client = Client::default();
//! let llm = GenAiLlmAdapter::new(client);
//!
//! // Tool adapter (MCP server)
//! let tools = McpToolAdapter::connect_stdio(
//! "filesystem",
//! "npx",
//! &["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
//! &[],
//! ).await?;
//!
//! // Session store
//! let store = InMemorySessionStore::new();
//!
//! // Event sink
//! let events = TracingEventSink::new();
//! ```
//!
//! ## Adapters
//!
//! ### LLM Adapters (`llm-genai`)
//!
//! Connects to LLM providers through the `genai` crate, supporting:
//! - OpenAI (GPT-4, GPT-4o-mini, etc.)
//! - Anthropic (Claude)
//! - Google (Gemini)
//! - Groq
//! - And more...
//!
//! ### Tool Adapters (`mcp-rmcp`)
//!
//! Connects to [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) servers:
//! - Filesystem operations
//! - Shell commands
//! - Database queries
//! - Custom tools
//!
//! ### Storage Adapters (`store-memory`)
//!
//! In-memory session storage for development and testing:
//! - Fast in-process storage
//! - No external dependencies
//! - Suitable for single-instance deployments
//!
//! ### Observability (`observe-tracing`)
//!
//! Event sink using the `tracing` ecosystem:
//! - Structured logging
//! - Integration with observability tools
//! - Configurable log levels
//!
//! ## Related Crates
//!
//! - [`bob_core`] - Domain types and ports
//! - [`bob_runtime`] - Runtime orchestration
//!
//! [`bob_core`]: https://docs.rs/bob-core
//! [`bob_runtime`]: https://docs.rs/bob-runtime
pub use bob_core as core;