ai-agents 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +29 -106
- data/docs/Gemfile +14 -0
- data/docs/Gemfile.lock +183 -0
- data/docs/_config.yml +53 -0
- data/docs/_sass/color_schemes/ruby.scss +72 -0
- data/docs/_sass/custom/custom.scss +93 -0
- data/docs/architecture.md +353 -0
- data/docs/assets/fonts/InterVariable.woff2 +0 -0
- data/docs/concepts/agent-tool.md +166 -0
- data/docs/concepts/agents.md +43 -0
- data/docs/concepts/context.md +110 -0
- data/docs/concepts/handoffs.md +81 -0
- data/docs/concepts/runner.md +87 -0
- data/docs/concepts/tools.md +62 -0
- data/docs/concepts.md +21 -0
- data/docs/guides/agent-as-tool-pattern.md +242 -0
- data/docs/guides/multi-agent-systems.md +261 -0
- data/docs/guides/rails-integration.md +440 -0
- data/docs/guides/state-persistence.md +451 -0
- data/docs/guides.md +18 -0
- data/docs/index.md +95 -0
- data/examples/collaborative-copilot/README.md +169 -0
- data/examples/collaborative-copilot/agents/analysis_agent.rb +48 -0
- data/examples/collaborative-copilot/agents/answer_suggestion_agent.rb +50 -0
- data/examples/collaborative-copilot/agents/copilot_orchestrator.rb +85 -0
- data/examples/collaborative-copilot/agents/integrations_agent.rb +58 -0
- data/examples/collaborative-copilot/agents/research_agent.rb +52 -0
- data/examples/collaborative-copilot/data/contacts.json +47 -0
- data/examples/collaborative-copilot/data/conversations.json +170 -0
- data/examples/collaborative-copilot/data/knowledge_base.json +58 -0
- data/examples/collaborative-copilot/data/linear_issues.json +83 -0
- data/examples/collaborative-copilot/data/stripe_billing.json +71 -0
- data/examples/collaborative-copilot/interactive.rb +90 -0
- data/examples/collaborative-copilot/tools/create_linear_ticket_tool.rb +58 -0
- data/examples/collaborative-copilot/tools/get_article_tool.rb +41 -0
- data/examples/collaborative-copilot/tools/get_contact_tool.rb +51 -0
- data/examples/collaborative-copilot/tools/get_conversation_tool.rb +53 -0
- data/examples/collaborative-copilot/tools/get_stripe_billing_tool.rb +44 -0
- data/examples/collaborative-copilot/tools/search_contacts_tool.rb +57 -0
- data/examples/collaborative-copilot/tools/search_conversations_tool.rb +54 -0
- data/examples/collaborative-copilot/tools/search_knowledge_base_tool.rb +55 -0
- data/examples/collaborative-copilot/tools/search_linear_issues_tool.rb +60 -0
- data/lib/agents/agent.rb +34 -0
- data/lib/agents/agent_tool.rb +113 -0
- data/lib/agents/handoff.rb +8 -34
- data/lib/agents/version.rb +1 -1
- data/lib/agents.rb +1 -0
- metadata +43 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63e05456e057d627b1b3a3f75bfbbf5753b7dc7521fc429376681d6ffe222e54
|
4
|
+
data.tar.gz: 354528a7d4eae51c5598b41ad7fbfb77ec715e9354469c827074a974cb1e43c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d6ff99299ba88e2fba47cff1fb13f686e30bf4826014da7bec95b7363609f8b6acc2bb69a86393786d048bd693d4b1efb2697cd6a7376abe0a81f6ea347da0d
|
7
|
+
data.tar.gz: 43fb8db36d106caff7220bcdc4f6dba063a0b82b208baf757a7ffa578d7dde8dd917cff408cfa897037c0a2c6efbe004685399bbe93dce92958575f1181112f8
|
data/README.md
CHANGED
@@ -2,14 +2,16 @@
|
|
2
2
|
<br>
|
3
3
|
<br>
|
4
4
|
<p>
|
5
|
-
<img src="./.github/ruby-
|
6
|
-
<h1>
|
5
|
+
<img src="./.github/ruby-agents.png" height="80px"/>
|
6
|
+
<h1>
|
7
|
+
AI Agents
|
8
|
+
</h1>
|
7
9
|
</p>
|
8
10
|
<br>
|
9
11
|
<br>
|
10
12
|
</div>
|
11
13
|
|
12
|
-
A Ruby SDK for building multi-agent AI workflows with seamless handoffs
|
14
|
+
A delightful provider agnostic Ruby SDK for building multi-agent AI workflows with seamless handoffs tool calling, and shared context.
|
13
15
|
|
14
16
|
## ✨ Features
|
15
17
|
|
@@ -17,7 +19,6 @@ A Ruby SDK for building multi-agent AI workflows with seamless handoffs, inspire
|
|
17
19
|
- **🔄 Seamless Handoffs**: Transparent agent-to-agent transfers (users never know!)
|
18
20
|
- **🛠️ Tool Integration**: Agents can use custom tools and functions
|
19
21
|
- **💾 Shared Context**: State management across agent interactions
|
20
|
-
- **🚀 Simple API**: One method call handles everything including handoffs
|
21
22
|
- **🔌 Provider Agnostic**: Works with OpenAI, Anthropic, and other LLM providers
|
22
23
|
|
23
24
|
## 🚀 Quick Start
|
@@ -66,32 +67,32 @@ triage = Agents::Agent.new(
|
|
66
67
|
instructions: "Route customers to the right specialist"
|
67
68
|
)
|
68
69
|
|
69
|
-
|
70
|
-
name: "
|
71
|
-
instructions: "Answer
|
72
|
-
tools: [
|
70
|
+
sales = Agents::Agent.new(
|
71
|
+
name: "Sales Agent",
|
72
|
+
instructions: "Answer details about plans",
|
73
|
+
tools: [CreateLeadTool.new, CRMLookupTool.new]
|
73
74
|
)
|
74
75
|
|
75
76
|
support = Agents::Agent.new(
|
76
77
|
name: "Support Agent",
|
77
|
-
instructions: "Handle technical issues",
|
78
|
-
tools: [TicketTool.new]
|
78
|
+
instructions: "Handle account realted and technical issues",
|
79
|
+
tools: [FaqLookupTool.new, TicketTool.new]
|
79
80
|
)
|
80
81
|
|
81
82
|
# Wire up handoff relationships - clean and simple!
|
82
|
-
triage.register_handoffs(
|
83
|
-
|
84
|
-
support.register_handoffs(triage)
|
83
|
+
triage.register_handoffs(sales, support)
|
84
|
+
sales.register_handoffs(triage) # Can route back to triage
|
85
|
+
support.register_handoffs(triage) # Hub-and-spoke pattern
|
85
86
|
|
86
87
|
# Create runner with all agents (triage is default entry point)
|
87
|
-
runner = Agents::Runner.with_agents(triage,
|
88
|
+
runner = Agents::Runner.with_agents(triage, sales, support)
|
88
89
|
|
89
90
|
# Run conversations with automatic handoffs and persistence
|
90
|
-
result = runner.run("
|
91
|
-
# User gets direct answer from
|
91
|
+
result = runner.run("Do you have special plans for businesses?")
|
92
|
+
# User gets direct answer from sales agent without knowing about the handoff!
|
92
93
|
|
93
94
|
# Continue the conversation seamlessly
|
94
|
-
result = runner.run("What
|
95
|
+
result = runner.run("What is the pricing for the premium fibre plan?", context: result.context)
|
95
96
|
# Context automatically tracks conversation history and current agent
|
96
97
|
```
|
97
98
|
|
@@ -99,19 +100,15 @@ result = runner.run("What about technical support?", context: result.context)
|
|
99
100
|
|
100
101
|
### Core Components
|
101
102
|
|
102
|
-
- **Agent**: Individual AI
|
103
|
-
- **AgentRunner**: Thread-safe execution manager
|
104
|
-
- **Runner**: Internal orchestrator that handles conversation turns (used by AgentRunner)
|
105
|
-
- **Context**: Shared state
|
106
|
-
- **Tools**: Custom functions that agents can
|
107
|
-
- **Handoffs**:
|
103
|
+
- **Agent**: Individual AI assistants configured with specific instructions, tools, and handoff relationships. Agents are immutable and thread-safe.
|
104
|
+
- **AgentRunner**: Thread-safe execution manager that coordinates multi-agent conversations. Create once and reuse across multiple threads safely.
|
105
|
+
- **Runner**: Internal orchestrator that handles individual conversation turns and manages the execution loop (used internally by AgentRunner).
|
106
|
+
- **Context & State**: Shared conversation state that persists across agent handoffs. Fully serializable for database storage and session management.
|
107
|
+
- **Tools**: Custom functions that agents can execute to interact with external systems (APIs, databases, etc.).
|
108
|
+
- **Handoffs**: Automatic transfers between specialized agents based on conversation context, completely transparent to users.
|
108
109
|
|
109
110
|
### Agent Definition
|
110
111
|
|
111
|
-
Agents can be created in two ways:
|
112
|
-
|
113
|
-
#### Instance-based (Recommended for dynamic agents)
|
114
|
-
|
115
112
|
```ruby
|
116
113
|
# Create agents as instances
|
117
114
|
agent = Agents::Agent.new(
|
@@ -125,21 +122,6 @@ agent = Agents::Agent.new(
|
|
125
122
|
agent.register_handoffs(technical_support, billing)
|
126
123
|
```
|
127
124
|
|
128
|
-
#### Class-based (Coming soon)
|
129
|
-
|
130
|
-
```ruby
|
131
|
-
class CustomerServiceAgent < Agents::Agent
|
132
|
-
name "Customer Service"
|
133
|
-
instructions <<~PROMPT
|
134
|
-
You are a helpful customer service agent.
|
135
|
-
Always be polite and professional.
|
136
|
-
PROMPT
|
137
|
-
|
138
|
-
model "gpt-4o"
|
139
|
-
uses EmailTool, TicketTool
|
140
|
-
end
|
141
|
-
```
|
142
|
-
|
143
125
|
### Custom Tools
|
144
126
|
|
145
127
|
```ruby
|
@@ -158,10 +140,8 @@ end
|
|
158
140
|
|
159
141
|
### Handoff Patterns
|
160
142
|
|
161
|
-
#### Hub-and-Spoke Pattern (Recommended)
|
162
|
-
|
163
143
|
```ruby
|
164
|
-
# Central triage agent routes to specialists
|
144
|
+
# Central triage agent routes to specialists (hub-and-spoke pattern)
|
165
145
|
triage = Agents::Agent.new(name: "Triage")
|
166
146
|
billing = Agents::Agent.new(name: "Billing")
|
167
147
|
support = Agents::Agent.new(name: "Support")
|
@@ -174,18 +154,6 @@ billing.register_handoffs(triage)
|
|
174
154
|
support.register_handoffs(triage)
|
175
155
|
```
|
176
156
|
|
177
|
-
#### Circular Handoffs
|
178
|
-
|
179
|
-
```ruby
|
180
|
-
# Agents can hand off to each other
|
181
|
-
sales = Agents::Agent.new(name: "Sales")
|
182
|
-
customer_info = Agents::Agent.new(name: "Customer Info")
|
183
|
-
|
184
|
-
# Both agents can transfer to each other
|
185
|
-
sales.register_handoffs(customer_info)
|
186
|
-
customer_info.register_handoffs(sales)
|
187
|
-
```
|
188
|
-
|
189
157
|
### Context Management & Persistence
|
190
158
|
|
191
159
|
```ruby
|
@@ -201,7 +169,7 @@ puts context[:conversation_history]
|
|
201
169
|
puts context[:current_agent] # Agent name (string), not object!
|
202
170
|
|
203
171
|
# Serialize context for persistence (Rails, databases, etc.)
|
204
|
-
json_context = JSON.dump(context)
|
172
|
+
json_context = JSON.dump(context)
|
205
173
|
|
206
174
|
# Later: restore and continue conversation
|
207
175
|
restored_context = JSON.parse(json_context, symbolize_names: true)
|
@@ -211,53 +179,13 @@ result = runner.run("Actually, I need technical support too", context: restored_
|
|
211
179
|
|
212
180
|
## 📋 Examples
|
213
181
|
|
214
|
-
|
215
|
-
|
216
|
-
See the complete ISP support example in `examples/isp-support/`:
|
182
|
+
Check out the `examples/` folder for complete working demos showcasing multi-agent workflows.
|
217
183
|
|
218
|
-
```
|
219
|
-
# Run the
|
184
|
+
```bash
|
185
|
+
# Run the ISP support demo
|
220
186
|
ruby examples/isp-support/interactive.rb
|
221
187
|
```
|
222
188
|
|
223
|
-
This showcases:
|
224
|
-
- **Triage Agent**: Routes customers to appropriate specialists
|
225
|
-
- **Customer Info Agent**: Handles account info and billing inquiries
|
226
|
-
- **Sales Agent**: Manages new connections and upgrades
|
227
|
-
- **Support Agent**: Provides technical troubleshooting
|
228
|
-
- **Hub-and-Spoke Handoffs**: Clean architecture pattern
|
229
|
-
|
230
|
-
### Airline Customer Service
|
231
|
-
|
232
|
-
See the airline booking example in `examples/booking/`:
|
233
|
-
|
234
|
-
```ruby
|
235
|
-
# Run the interactive demo
|
236
|
-
ruby examples/booking/interactive.rb
|
237
|
-
```
|
238
|
-
|
239
|
-
This showcases:
|
240
|
-
- **Triage Agent**: Routes questions to specialists
|
241
|
-
- **FAQ Agent**: Answers questions about policies, seats, baggage
|
242
|
-
- **Seat Booking Agent**: Handles seat changes and updates
|
243
|
-
- **Seamless Handoffs**: Users never repeat their questions
|
244
|
-
|
245
|
-
### Sample Conversation
|
246
|
-
|
247
|
-
```
|
248
|
-
You: How many seats are on the plane?
|
249
|
-
|
250
|
-
Agent: The plane has a total of 120 seats, which includes 22 business
|
251
|
-
class seats and 98 economy seats. Exit rows are located at rows 4 and
|
252
|
-
16, and rows 5-8 are designated as Economy Plus, offering extra legroom.
|
253
|
-
```
|
254
|
-
|
255
|
-
Behind the scenes:
|
256
|
-
1. Triage Agent receives question
|
257
|
-
2. Automatically transfers to FAQ Agent
|
258
|
-
3. FAQ Agent processes original question and responds
|
259
|
-
4. User sees seamless experience!
|
260
|
-
|
261
189
|
## 🔧 Configuration
|
262
190
|
|
263
191
|
```ruby
|
@@ -298,8 +226,3 @@ This project is licensed under the MIT License - see the LICENSE file for detail
|
|
298
226
|
|
299
227
|
- Inspired by [OpenAI's Agents SDK](https://github.com/openai/agents)
|
300
228
|
- Built on top of [RubyLLM](https://rubyllm.com) for LLM integration
|
301
|
-
- Thanks to the Ruby community for continuous inspiration
|
302
|
-
|
303
|
-
---
|
304
|
-
|
305
|
-
**Built with ❤️ by the Chatwoot Team**
|
data/docs/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "jekyll"
|
6
|
+
gem "just-the-docs"
|
7
|
+
gem "webrick"
|
8
|
+
|
9
|
+
# GitHub Pages plugins
|
10
|
+
group :jekyll_plugins do
|
11
|
+
gem "jekyll-remote-theme"
|
12
|
+
gem "jekyll-seo-tag"
|
13
|
+
gem "jekyll-sitemap"
|
14
|
+
end
|
data/docs/Gemfile.lock
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.8.7)
|
5
|
+
public_suffix (>= 2.0.2, < 7.0)
|
6
|
+
base64 (0.3.0)
|
7
|
+
bigdecimal (3.2.2)
|
8
|
+
colorator (1.1.0)
|
9
|
+
concurrent-ruby (1.3.5)
|
10
|
+
csv (3.3.5)
|
11
|
+
em-websocket (0.5.3)
|
12
|
+
eventmachine (>= 0.12.9)
|
13
|
+
http_parser.rb (~> 0)
|
14
|
+
eventmachine (1.2.7)
|
15
|
+
ffi (1.17.2)
|
16
|
+
ffi (1.17.2-aarch64-linux-gnu)
|
17
|
+
ffi (1.17.2-aarch64-linux-musl)
|
18
|
+
ffi (1.17.2-arm-linux-gnu)
|
19
|
+
ffi (1.17.2-arm-linux-musl)
|
20
|
+
ffi (1.17.2-arm64-darwin)
|
21
|
+
ffi (1.17.2-x86-linux-gnu)
|
22
|
+
ffi (1.17.2-x86-linux-musl)
|
23
|
+
ffi (1.17.2-x86_64-darwin)
|
24
|
+
ffi (1.17.2-x86_64-linux-gnu)
|
25
|
+
ffi (1.17.2-x86_64-linux-musl)
|
26
|
+
forwardable-extended (2.6.0)
|
27
|
+
google-protobuf (4.31.1)
|
28
|
+
bigdecimal
|
29
|
+
rake (>= 13)
|
30
|
+
google-protobuf (4.31.1-aarch64-linux-gnu)
|
31
|
+
bigdecimal
|
32
|
+
rake (>= 13)
|
33
|
+
google-protobuf (4.31.1-aarch64-linux-musl)
|
34
|
+
bigdecimal
|
35
|
+
rake (>= 13)
|
36
|
+
google-protobuf (4.31.1-arm64-darwin)
|
37
|
+
bigdecimal
|
38
|
+
rake (>= 13)
|
39
|
+
google-protobuf (4.31.1-x86-linux-gnu)
|
40
|
+
bigdecimal
|
41
|
+
rake (>= 13)
|
42
|
+
google-protobuf (4.31.1-x86-linux-musl)
|
43
|
+
bigdecimal
|
44
|
+
rake (>= 13)
|
45
|
+
google-protobuf (4.31.1-x86_64-darwin)
|
46
|
+
bigdecimal
|
47
|
+
rake (>= 13)
|
48
|
+
google-protobuf (4.31.1-x86_64-linux-gnu)
|
49
|
+
bigdecimal
|
50
|
+
rake (>= 13)
|
51
|
+
google-protobuf (4.31.1-x86_64-linux-musl)
|
52
|
+
bigdecimal
|
53
|
+
rake (>= 13)
|
54
|
+
http_parser.rb (0.8.0)
|
55
|
+
i18n (1.14.7)
|
56
|
+
concurrent-ruby (~> 1.0)
|
57
|
+
jekyll (4.4.1)
|
58
|
+
addressable (~> 2.4)
|
59
|
+
base64 (~> 0.2)
|
60
|
+
colorator (~> 1.0)
|
61
|
+
csv (~> 3.0)
|
62
|
+
em-websocket (~> 0.5)
|
63
|
+
i18n (~> 1.0)
|
64
|
+
jekyll-sass-converter (>= 2.0, < 4.0)
|
65
|
+
jekyll-watch (~> 2.0)
|
66
|
+
json (~> 2.6)
|
67
|
+
kramdown (~> 2.3, >= 2.3.1)
|
68
|
+
kramdown-parser-gfm (~> 1.0)
|
69
|
+
liquid (~> 4.0)
|
70
|
+
mercenary (~> 0.3, >= 0.3.6)
|
71
|
+
pathutil (~> 0.9)
|
72
|
+
rouge (>= 3.0, < 5.0)
|
73
|
+
safe_yaml (~> 1.0)
|
74
|
+
terminal-table (>= 1.8, < 4.0)
|
75
|
+
webrick (~> 1.7)
|
76
|
+
jekyll-include-cache (0.2.1)
|
77
|
+
jekyll (>= 3.7, < 5.0)
|
78
|
+
jekyll-remote-theme (0.4.3)
|
79
|
+
addressable (~> 2.0)
|
80
|
+
jekyll (>= 3.5, < 5.0)
|
81
|
+
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
|
82
|
+
rubyzip (>= 1.3.0, < 3.0)
|
83
|
+
jekyll-sass-converter (3.0.0)
|
84
|
+
sass-embedded (~> 1.54)
|
85
|
+
jekyll-seo-tag (2.8.0)
|
86
|
+
jekyll (>= 3.8, < 5.0)
|
87
|
+
jekyll-sitemap (1.4.0)
|
88
|
+
jekyll (>= 3.7, < 5.0)
|
89
|
+
jekyll-watch (2.2.1)
|
90
|
+
listen (~> 3.0)
|
91
|
+
json (2.12.2)
|
92
|
+
just-the-docs (0.10.1)
|
93
|
+
jekyll (>= 3.8.5)
|
94
|
+
jekyll-include-cache
|
95
|
+
jekyll-seo-tag (>= 2.0)
|
96
|
+
rake (>= 12.3.1)
|
97
|
+
kramdown (2.5.1)
|
98
|
+
rexml (>= 3.3.9)
|
99
|
+
kramdown-parser-gfm (1.1.0)
|
100
|
+
kramdown (~> 2.0)
|
101
|
+
liquid (4.0.4)
|
102
|
+
listen (3.9.0)
|
103
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
104
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
105
|
+
mercenary (0.4.0)
|
106
|
+
pathutil (0.16.2)
|
107
|
+
forwardable-extended (~> 2.6)
|
108
|
+
public_suffix (6.0.2)
|
109
|
+
rake (13.3.0)
|
110
|
+
rb-fsevent (0.11.2)
|
111
|
+
rb-inotify (0.11.1)
|
112
|
+
ffi (~> 1.0)
|
113
|
+
rexml (3.4.1)
|
114
|
+
rouge (4.5.2)
|
115
|
+
rubyzip (2.4.1)
|
116
|
+
safe_yaml (1.0.5)
|
117
|
+
sass-embedded (1.89.2)
|
118
|
+
google-protobuf (~> 4.31)
|
119
|
+
rake (>= 13)
|
120
|
+
sass-embedded (1.89.2-aarch64-linux-android)
|
121
|
+
google-protobuf (~> 4.31)
|
122
|
+
sass-embedded (1.89.2-aarch64-linux-gnu)
|
123
|
+
google-protobuf (~> 4.31)
|
124
|
+
sass-embedded (1.89.2-aarch64-linux-musl)
|
125
|
+
google-protobuf (~> 4.31)
|
126
|
+
sass-embedded (1.89.2-arm-linux-androideabi)
|
127
|
+
google-protobuf (~> 4.31)
|
128
|
+
sass-embedded (1.89.2-arm-linux-gnueabihf)
|
129
|
+
google-protobuf (~> 4.31)
|
130
|
+
sass-embedded (1.89.2-arm-linux-musleabihf)
|
131
|
+
google-protobuf (~> 4.31)
|
132
|
+
sass-embedded (1.89.2-arm64-darwin)
|
133
|
+
google-protobuf (~> 4.31)
|
134
|
+
sass-embedded (1.89.2-riscv64-linux-android)
|
135
|
+
google-protobuf (~> 4.31)
|
136
|
+
sass-embedded (1.89.2-riscv64-linux-gnu)
|
137
|
+
google-protobuf (~> 4.31)
|
138
|
+
sass-embedded (1.89.2-riscv64-linux-musl)
|
139
|
+
google-protobuf (~> 4.31)
|
140
|
+
sass-embedded (1.89.2-x86_64-darwin)
|
141
|
+
google-protobuf (~> 4.31)
|
142
|
+
sass-embedded (1.89.2-x86_64-linux-android)
|
143
|
+
google-protobuf (~> 4.31)
|
144
|
+
sass-embedded (1.89.2-x86_64-linux-gnu)
|
145
|
+
google-protobuf (~> 4.31)
|
146
|
+
sass-embedded (1.89.2-x86_64-linux-musl)
|
147
|
+
google-protobuf (~> 4.31)
|
148
|
+
terminal-table (3.0.2)
|
149
|
+
unicode-display_width (>= 1.1.1, < 3)
|
150
|
+
unicode-display_width (2.6.0)
|
151
|
+
webrick (1.9.1)
|
152
|
+
|
153
|
+
PLATFORMS
|
154
|
+
aarch64-linux-android
|
155
|
+
aarch64-linux-gnu
|
156
|
+
aarch64-linux-musl
|
157
|
+
arm-linux-androideabi
|
158
|
+
arm-linux-gnu
|
159
|
+
arm-linux-gnueabihf
|
160
|
+
arm-linux-musl
|
161
|
+
arm-linux-musleabihf
|
162
|
+
arm64-darwin
|
163
|
+
riscv64-linux-android
|
164
|
+
riscv64-linux-gnu
|
165
|
+
riscv64-linux-musl
|
166
|
+
ruby
|
167
|
+
x86-linux-gnu
|
168
|
+
x86-linux-musl
|
169
|
+
x86_64-darwin
|
170
|
+
x86_64-linux-android
|
171
|
+
x86_64-linux-gnu
|
172
|
+
x86_64-linux-musl
|
173
|
+
|
174
|
+
DEPENDENCIES
|
175
|
+
jekyll
|
176
|
+
jekyll-remote-theme
|
177
|
+
jekyll-seo-tag
|
178
|
+
jekyll-sitemap
|
179
|
+
just-the-docs
|
180
|
+
webrick
|
181
|
+
|
182
|
+
BUNDLED WITH
|
183
|
+
2.6.9
|
data/docs/_config.yml
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
title: AI Agents
|
2
|
+
description: A Ruby SDK for building multi-agent AI workflows
|
3
|
+
baseurl: ""
|
4
|
+
url: ""
|
5
|
+
|
6
|
+
# Theme
|
7
|
+
theme: just-the-docs
|
8
|
+
|
9
|
+
# Color scheme
|
10
|
+
color_scheme: ruby
|
11
|
+
|
12
|
+
# Search
|
13
|
+
search_enabled: true
|
14
|
+
search:
|
15
|
+
heading_level: 2
|
16
|
+
previews: 3
|
17
|
+
preview_words_before: 5
|
18
|
+
preview_words_after: 10
|
19
|
+
tokenizer_separator: /[\s/]+/
|
20
|
+
rel_url: true
|
21
|
+
button: false
|
22
|
+
|
23
|
+
# Navigation
|
24
|
+
nav_sort: case_insensitive
|
25
|
+
nav_external_links:
|
26
|
+
- title: GitHub
|
27
|
+
url: https://github.com/chatwoot/ai-agents
|
28
|
+
|
29
|
+
# Footer
|
30
|
+
footer_content: "Copyright © 2025 Chatwoot Inc."
|
31
|
+
|
32
|
+
# Plugins
|
33
|
+
plugins:
|
34
|
+
- jekyll-remote-theme
|
35
|
+
- jekyll-seo-tag
|
36
|
+
- jekyll-sitemap
|
37
|
+
|
38
|
+
# Markdown
|
39
|
+
markdown: kramdown
|
40
|
+
highlighter: rouge
|
41
|
+
|
42
|
+
# Exclude from processing
|
43
|
+
exclude:
|
44
|
+
- .sass-cache/
|
45
|
+
- .jekyll-cache/
|
46
|
+
- gemfiles/
|
47
|
+
- Gemfile
|
48
|
+
- Gemfile.lock
|
49
|
+
- node_modules/
|
50
|
+
- vendor/bundle/
|
51
|
+
- vendor/cache/
|
52
|
+
- vendor/gems/
|
53
|
+
- vendor/ruby/
|
@@ -0,0 +1,72 @@
|
|
1
|
+
// Ruby red color scheme for AI Agents documentation
|
2
|
+
// Inspired by Ruby's signature red color
|
3
|
+
|
4
|
+
// Define red color variables
|
5
|
+
$red-000: #fff5f5;
|
6
|
+
$red-100: #fed7d7;
|
7
|
+
$red-200: #feb2b2;
|
8
|
+
$red-300: #fc8181;
|
9
|
+
$red-400: #e53e3e;
|
10
|
+
$red-500: #d30001; // Primary Ruby red
|
11
|
+
$red-600: #b30001;
|
12
|
+
$red-700: #930001;
|
13
|
+
$red-800: #730001;
|
14
|
+
$red-900: #530001;
|
15
|
+
|
16
|
+
// Grey colors with subtle reddish tint for text and backgrounds
|
17
|
+
$grey-dk-000: #959396;
|
18
|
+
$grey-dk-100: #5c5962;
|
19
|
+
$grey-dk-200: #44434d;
|
20
|
+
$grey-dk-250: #302d36;
|
21
|
+
$grey-dk-300: #27262b;
|
22
|
+
|
23
|
+
$grey-lt-000: #faf6f6; // Very slightly reddish background
|
24
|
+
$grey-lt-100: #f7f2f2; // Very subtle reddish tint
|
25
|
+
$grey-lt-200: #f4efef; // Very subtle reddish tint
|
26
|
+
$grey-lt-300: #f0e8e8; // Very subtle reddish tint
|
27
|
+
|
28
|
+
// Override theme variables
|
29
|
+
$link-color: $red-500;
|
30
|
+
$btn-primary-color: $red-500;
|
31
|
+
$base-button-color: #f7f7f7;
|
32
|
+
|
33
|
+
// Navigation
|
34
|
+
$nav-child-link-color: $grey-dk-100;
|
35
|
+
$nav-list-item-color: $grey-dk-100;
|
36
|
+
$nav-list-item-active-color: $red-500;
|
37
|
+
|
38
|
+
// Sidebar background
|
39
|
+
$sidebar-color: $grey-lt-100; // Subtle reddish tint for sidebar
|
40
|
+
|
41
|
+
// Search
|
42
|
+
$search-active-color: $red-500;
|
43
|
+
$search-background-color: $grey-lt-000;
|
44
|
+
|
45
|
+
// Code
|
46
|
+
$code-background-color: $grey-lt-000;
|
47
|
+
$code-border-color: $grey-lt-300;
|
48
|
+
|
49
|
+
// Tables
|
50
|
+
$table-background-color: $grey-lt-000;
|
51
|
+
$border-color: $grey-lt-300;
|
52
|
+
|
53
|
+
// Buttons
|
54
|
+
$btn-outline-color: $red-500;
|
55
|
+
|
56
|
+
// Focus states
|
57
|
+
$focus-color: $red-400;
|
58
|
+
|
59
|
+
// Feedback states
|
60
|
+
$feedback-color: $grey-lt-300;
|
61
|
+
|
62
|
+
// Headings
|
63
|
+
$h1-color: $grey-dk-300;
|
64
|
+
$h2-color: $grey-dk-300;
|
65
|
+
$h3-color: $grey-dk-200;
|
66
|
+
$h4-color: $grey-dk-200;
|
67
|
+
$h5-color: $grey-dk-200;
|
68
|
+
$h6-color: $grey-dk-200;
|
69
|
+
|
70
|
+
// Body text
|
71
|
+
$body-text-color: $grey-dk-100;
|
72
|
+
$body-heading-color: $grey-dk-300;
|
@@ -0,0 +1,93 @@
|
|
1
|
+
// Self-hosted Inter Variable font
|
2
|
+
@font-face {
|
3
|
+
font-family: "Inter";
|
4
|
+
src: url("/assets/fonts/InterVariable.woff2") format("woff2-variations");
|
5
|
+
font-weight: 100 900;
|
6
|
+
font-style: normal;
|
7
|
+
font-display: swap;
|
8
|
+
font-named-instance: "Regular";
|
9
|
+
}
|
10
|
+
|
11
|
+
// Override font variables
|
12
|
+
$body-font-family:
|
13
|
+
"Inter",
|
14
|
+
-apple-system,
|
15
|
+
BlinkMacSystemFont,
|
16
|
+
"Segoe UI",
|
17
|
+
Helvetica,
|
18
|
+
Arial,
|
19
|
+
sans-serif;
|
20
|
+
$mono-font-family: "SF Mono", Monaco, Inconsolata, "Roboto Mono", monospace;
|
21
|
+
|
22
|
+
// Apply Inter to all text elements
|
23
|
+
body {
|
24
|
+
font-family: $body-font-family;
|
25
|
+
font-feature-settings:
|
26
|
+
"cv02", "cv03", "cv04", "cv11"; // Display-like features
|
27
|
+
}
|
28
|
+
|
29
|
+
// Ensure headings use Inter as well
|
30
|
+
h1,
|
31
|
+
h2,
|
32
|
+
h3,
|
33
|
+
h4,
|
34
|
+
h5,
|
35
|
+
h6 {
|
36
|
+
font-family: $body-font-family;
|
37
|
+
}
|
38
|
+
|
39
|
+
// Custom logo styling
|
40
|
+
.site-logo {
|
41
|
+
padding: 1rem;
|
42
|
+
border-bottom: 1px solid var(--border-color);
|
43
|
+
|
44
|
+
.site-logo-link {
|
45
|
+
display: flex;
|
46
|
+
align-items: center;
|
47
|
+
text-decoration: none;
|
48
|
+
color: inherit;
|
49
|
+
|
50
|
+
&:hover {
|
51
|
+
text-decoration: none;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
.site-logo-image {
|
56
|
+
width: 32px;
|
57
|
+
height: 32px;
|
58
|
+
margin-right: 0.75rem;
|
59
|
+
border-radius: 6px;
|
60
|
+
}
|
61
|
+
|
62
|
+
.site-title {
|
63
|
+
font-weight: 600;
|
64
|
+
font-size: 1.1rem;
|
65
|
+
color: var(--body-heading-color);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
// Note callout styling
|
70
|
+
.note {
|
71
|
+
padding: 1rem;
|
72
|
+
margin: 1rem 0;
|
73
|
+
background-color: #faf6f6;
|
74
|
+
border: 1px solid #f0e8e8;
|
75
|
+
border-left: 4px solid #d30001;
|
76
|
+
border-radius: 6px;
|
77
|
+
position: relative;
|
78
|
+
|
79
|
+
&::before {
|
80
|
+
content: "NOTE";
|
81
|
+
font-weight: 600;
|
82
|
+
font-size: 0.75rem;
|
83
|
+
color: #d30001;
|
84
|
+
text-transform: uppercase;
|
85
|
+
letter-spacing: 0.05em;
|
86
|
+
display: block;
|
87
|
+
margin-bottom: 0.5rem;
|
88
|
+
}
|
89
|
+
|
90
|
+
p:last-child {
|
91
|
+
margin-bottom: 0;
|
92
|
+
}
|
93
|
+
}
|