agent99 0.0.3 → 0.0.5

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.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/A2A_SPEC-dev.md +1829 -0
  3. data/CHANGELOG.md +38 -0
  4. data/COMMITS.md +196 -0
  5. data/DOCS.md +96 -0
  6. data/README.md +212 -84
  7. data/Rakefile +62 -0
  8. data/docs/AI/htm.md +215 -0
  9. data/docs/AI/htm.rb +141 -0
  10. data/docs/AI/htm_demo.db +0 -0
  11. data/docs/AI/notes_on_htm_implementation.md +1319 -0
  12. data/docs/AI/some_code.rb +692 -0
  13. data/docs/advanced-topics/a2a-protocol.md +13 -0
  14. data/docs/{advanced_features.md → advanced-topics/advanced-features.md} +9 -4
  15. data/docs/{control_actions.md → advanced-topics/control-actions.md} +2 -0
  16. data/docs/advanced-topics/model-context-protocol.md +4 -0
  17. data/docs/advanced-topics/multi-agent-processing.md +674 -0
  18. data/docs/agent-development/request-response-handling.md +512 -0
  19. data/docs/agent99_framework/central_registry.md +94 -0
  20. data/docs/agent99_framework/message_client.md +120 -0
  21. data/docs/agent99_framework/registry_client.md +119 -0
  22. data/docs/api-reference/agent99-base.md +463 -0
  23. data/docs/api-reference/message-clients.md +495 -0
  24. data/docs/{api_reference.md → api-reference/overview.md} +14 -4
  25. data/docs/api-reference/registry-client.md +470 -0
  26. data/docs/api-reference/schemas.md +518 -0
  27. data/docs/assets/css/custom.css +27 -0
  28. data/docs/assets/images/agent-lifecycle.svg +73 -0
  29. data/docs/assets/images/agent-registry-process.svg +86 -0
  30. data/docs/assets/images/agent-registry-processes.svg +114 -0
  31. data/docs/assets/images/agent-types-overview.svg +51 -0
  32. data/docs/assets/images/agent99-architecture.svg +85 -0
  33. data/docs/assets/images/agent99_logo.png +0 -0
  34. data/docs/assets/images/control-actions-state.svg +83 -0
  35. data/docs/assets/images/knowledge-graph.svg +77 -0
  36. data/docs/assets/images/message-processing-flow.svg +148 -0
  37. data/docs/assets/images/multi-agent-system.svg +66 -0
  38. data/docs/assets/images/proxy-pattern-sequence.svg +48 -0
  39. data/docs/assets/images/request-flow.svg +97 -0
  40. data/docs/assets/images/request-processing-lifecycle.svg +50 -0
  41. data/docs/assets/images/request-response-sequence.svg +39 -0
  42. data/docs/{agent_lifecycle.md → core-concepts/agent-lifecycle.md} +2 -0
  43. data/docs/core-concepts/agent-types.md +255 -0
  44. data/docs/{architecture.md → core-concepts/architecture.md} +5 -5
  45. data/docs/core-concepts/what-is-an-agent.md +293 -0
  46. data/docs/diagrams/message-flow-sequence.svg +198 -0
  47. data/docs/diagrams/p2p-network-topology.svg +181 -0
  48. data/docs/diagrams/smart-transport-routing.svg +165 -0
  49. data/docs/diagrams/three-layer-architecture.svg +77 -0
  50. data/docs/diagrams/transport-extension-api.svg +309 -0
  51. data/docs/diagrams/transport-extension-architecture.svg +234 -0
  52. data/docs/diagrams/transport-selection-flowchart.svg +264 -0
  53. data/docs/examples/advanced-examples.md +951 -0
  54. data/docs/examples/basic-examples.md +268 -0
  55. data/docs/{agent_discovery.md → framework-components/agent-discovery.md} +9 -5
  56. data/docs/{agent_registry_processes.md → framework-components/agent-registry.md} +9 -3
  57. data/docs/{message_processing.md → framework-components/message-processing.md} +3 -1
  58. data/docs/getting-started/basic-example.md +306 -0
  59. data/docs/getting-started/installation.md +160 -0
  60. data/docs/getting-started/overview.md +64 -0
  61. data/docs/getting-started/quick-start.md +179 -0
  62. data/docs/index.md +97 -0
  63. data/docs/operations/breaking-changes.md +26 -0
  64. data/examples/DEMO.md +148 -0
  65. data/examples/README.md +50 -0
  66. data/examples/agent_watcher.rb +5 -1
  67. data/examples/bad_agent.rb +32 -0
  68. data/examples/chief_agent.rb +17 -6
  69. data/examples/control.rb +16 -7
  70. data/examples/example_agent.rb +16 -3
  71. data/examples/maxwell_agent86.rb +15 -26
  72. data/examples/registry.rb +10 -9
  73. data/examples/run_demo.rb +433 -0
  74. data/lib/agent99/agent_discovery.rb +4 -0
  75. data/lib/agent99/agent_lifecycle.rb +34 -10
  76. data/lib/agent99/amqp_message_client.rb +2 -2
  77. data/lib/agent99/base.rb +6 -2
  78. data/lib/agent99/message_processing.rb +6 -10
  79. data/lib/agent99/registry_client.rb +15 -11
  80. data/lib/agent99/tcp_message_client.rb +183 -0
  81. data/lib/agent99/version.rb +1 -1
  82. data/lib/agent99.rb +1 -1
  83. data/mkdocs.yml +195 -0
  84. data/p2p_plan.md +533 -0
  85. data/p2p_roadmap.md +299 -0
  86. data/registry_plan.md +1818 -0
  87. metadata +93 -30
  88. data/docs/README.md +0 -57
  89. data/docs/diagrams/agent_registry_processes.dot +0 -42
  90. data/docs/diagrams/agent_registry_processes.png +0 -0
  91. data/docs/diagrams/high_level_architecture.dot +0 -26
  92. data/docs/diagrams/high_level_architecture.png +0 -0
  93. data/docs/diagrams/request_flow.dot +0 -42
  94. data/docs/diagrams/request_flow.png +0 -0
  95. /data/docs/{extending_the_framework.md → advanced-topics/extending-the-framework.md} +0 -0
  96. /data/docs/{custom_agent_implementation.md → agent-development/custom-agent-implementation.md} +0 -0
  97. /data/docs/{error_handling_and_logging.md → agent-development/error-handling-and-logging.md} +0 -0
  98. /data/docs/{schema_definition.md → agent-development/schema-definition.md} +0 -0
  99. /data/docs/{messaging_system.md → framework-components/messaging-system.md} +0 -0
  100. /data/docs/{configuration.md → operations/configuration.md} +0 -0
  101. /data/docs/{preformance_considerations.md → operations/performance-considerations.md} +0 -0
  102. /data/docs/{security.md → operations/security.md} +0 -0
  103. /data/docs/{troubleshooting.md → operations/troubleshooting.md} +0 -0
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agent99
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dewayne VanHoozer
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bunny
@@ -136,6 +135,20 @@ dependencies:
136
135
  - - ">="
137
136
  - !ruby/object:Gem::Version
138
137
  version: '0'
138
+ - !ruby/object:Gem::Dependency
139
+ name: webrick
140
+ requirement: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ type: :development
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
139
152
  description: "`agent99` is a Ruby gem designed to facilitate the creation and management
140
153
  \nof smart agents, providing a straightforward interface for tasks such \nas natural
141
154
  language processing, context handling, and conversing with various AI \nmodels.
@@ -148,37 +161,83 @@ extensions: []
148
161
  extra_rdoc_files: []
149
162
  files:
150
163
  - ".envrc"
164
+ - A2A_SPEC-dev.md
151
165
  - CHANGELOG.md
166
+ - COMMITS.md
167
+ - DOCS.md
152
168
  - LICENSE
153
169
  - README.md
154
170
  - Rakefile
155
- - docs/README.md
156
- - docs/advanced_features.md
157
- - docs/agent_discovery.md
158
- - docs/agent_lifecycle.md
159
- - docs/agent_registry_processes.md
160
- - docs/api_reference.md
161
- - docs/architecture.md
162
- - docs/configuration.md
163
- - docs/control_actions.md
164
- - docs/custom_agent_implementation.md
165
- - docs/diagrams/agent_registry_processes.dot
166
- - docs/diagrams/agent_registry_processes.png
167
- - docs/diagrams/high_level_architecture.dot
168
- - docs/diagrams/high_level_architecture.png
169
- - docs/diagrams/request_flow.dot
170
- - docs/diagrams/request_flow.png
171
- - docs/error_handling_and_logging.md
172
- - docs/extending_the_framework.md
173
- - docs/message_processing.md
174
- - docs/messaging_system.md
175
- - docs/preformance_considerations.md
176
- - docs/schema_definition.md
177
- - docs/security.md
178
- - docs/troubleshooting.md
171
+ - docs/AI/htm.md
172
+ - docs/AI/htm.rb
173
+ - docs/AI/htm_demo.db
174
+ - docs/AI/notes_on_htm_implementation.md
175
+ - docs/AI/some_code.rb
176
+ - docs/advanced-topics/a2a-protocol.md
177
+ - docs/advanced-topics/advanced-features.md
178
+ - docs/advanced-topics/control-actions.md
179
+ - docs/advanced-topics/extending-the-framework.md
180
+ - docs/advanced-topics/model-context-protocol.md
181
+ - docs/advanced-topics/multi-agent-processing.md
182
+ - docs/agent-development/custom-agent-implementation.md
183
+ - docs/agent-development/error-handling-and-logging.md
184
+ - docs/agent-development/request-response-handling.md
185
+ - docs/agent-development/schema-definition.md
186
+ - docs/agent99_framework/central_registry.md
187
+ - docs/agent99_framework/message_client.md
188
+ - docs/agent99_framework/registry_client.md
189
+ - docs/api-reference/agent99-base.md
190
+ - docs/api-reference/message-clients.md
191
+ - docs/api-reference/overview.md
192
+ - docs/api-reference/registry-client.md
193
+ - docs/api-reference/schemas.md
194
+ - docs/assets/css/custom.css
195
+ - docs/assets/images/agent-lifecycle.svg
196
+ - docs/assets/images/agent-registry-process.svg
197
+ - docs/assets/images/agent-registry-processes.svg
198
+ - docs/assets/images/agent-types-overview.svg
199
+ - docs/assets/images/agent99-architecture.svg
200
+ - docs/assets/images/agent99_logo.png
201
+ - docs/assets/images/control-actions-state.svg
202
+ - docs/assets/images/knowledge-graph.svg
203
+ - docs/assets/images/message-processing-flow.svg
204
+ - docs/assets/images/multi-agent-system.svg
205
+ - docs/assets/images/proxy-pattern-sequence.svg
206
+ - docs/assets/images/request-flow.svg
207
+ - docs/assets/images/request-processing-lifecycle.svg
208
+ - docs/assets/images/request-response-sequence.svg
209
+ - docs/core-concepts/agent-lifecycle.md
210
+ - docs/core-concepts/agent-types.md
211
+ - docs/core-concepts/architecture.md
212
+ - docs/core-concepts/what-is-an-agent.md
213
+ - docs/diagrams/message-flow-sequence.svg
214
+ - docs/diagrams/p2p-network-topology.svg
215
+ - docs/diagrams/smart-transport-routing.svg
216
+ - docs/diagrams/three-layer-architecture.svg
217
+ - docs/diagrams/transport-extension-api.svg
218
+ - docs/diagrams/transport-extension-architecture.svg
219
+ - docs/diagrams/transport-selection-flowchart.svg
220
+ - docs/examples/advanced-examples.md
221
+ - docs/examples/basic-examples.md
222
+ - docs/framework-components/agent-discovery.md
223
+ - docs/framework-components/agent-registry.md
224
+ - docs/framework-components/message-processing.md
225
+ - docs/framework-components/messaging-system.md
226
+ - docs/getting-started/basic-example.md
227
+ - docs/getting-started/installation.md
228
+ - docs/getting-started/overview.md
229
+ - docs/getting-started/quick-start.md
230
+ - docs/index.md
231
+ - docs/operations/breaking-changes.md
232
+ - docs/operations/configuration.md
233
+ - docs/operations/performance-considerations.md
234
+ - docs/operations/security.md
235
+ - docs/operations/troubleshooting.md
236
+ - examples/DEMO.md
179
237
  - examples/README.md
180
238
  - examples/agent_watcher.rb
181
239
  - examples/agents/.keep
240
+ - examples/bad_agent.rb
182
241
  - examples/chief_agent.rb
183
242
  - examples/control.rb
184
243
  - examples/diagram.dot
@@ -188,6 +247,7 @@ files:
188
247
  - examples/maxwell_agent86.rb
189
248
  - examples/maxwell_request.rb
190
249
  - examples/registry.rb
250
+ - examples/run_demo.rb
191
251
  - examples/start_rabbitmq_and_registry.sh
192
252
  - lib/agent99.rb
193
253
  - lib/agent99/.irbrc
@@ -201,8 +261,13 @@ files:
201
261
  - lib/agent99/message_processing.rb
202
262
  - lib/agent99/nats_message_client.rb
203
263
  - lib/agent99/registry_client.rb
264
+ - lib/agent99/tcp_message_client.rb
204
265
  - lib/agent99/timestamp.rb
205
266
  - lib/agent99/version.rb
267
+ - mkdocs.yml
268
+ - p2p_plan.md
269
+ - p2p_roadmap.md
270
+ - registry_plan.md
206
271
  - sig/ai_agent.rbs
207
272
  homepage: https://github.com/MadBomber/agent99
208
273
  licenses:
@@ -212,7 +277,6 @@ metadata:
212
277
  homepage_uri: https://github.com/MadBomber/agent99
213
278
  source_code_uri: https://github.com/MadBomber/agent99
214
279
  changelog_uri: https://github.com/MadBomber/agent99/blob/main/CHANGELOG.md
215
- post_install_message:
216
280
  rdoc_options: []
217
281
  require_paths:
218
282
  - lib
@@ -228,8 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
292
  - !ruby/object:Gem::Version
229
293
  version: '0'
230
294
  requirements: []
231
- rubygems_version: 3.5.23
232
- signing_key:
295
+ rubygems_version: 3.7.1
233
296
  specification_version: 4
234
297
  summary: An intelligent agent framework for Ruby
235
298
  test_files: []
data/docs/README.md DELETED
@@ -1,57 +0,0 @@
1
- # Agent99 Framework Documentation
2
-
3
- Welcome to the Agent99 Framework documentation! Below is a table of contents and brief summaries of each markdown file available in this directory. Explore each document for more detailed information on the Agent99 Framework and how to effectively utilize it in your projects!
4
-
5
- ## Table of Contents
6
-
7
- 1. **[Agent Discovery](agent_discovery.md)**
8
- - This document explains how agents within the Agent99 framework discover each other based on their declared capabilities, including the registration and querying processes involved.
9
-
10
- 2. **[Agent Lifecycle](agent_lifecycle.md)**
11
- - Learn about the various stages an agent undergoes during its lifetime, from creation and initialization to running and graceful shutdown.
12
-
13
- 3. **[Agent Registry Processes](agent_registry_processes.md)**
14
- - This file details the processes handled by the Agent registry, including registration, discovery, and withdrawal of agents, along with example code to illustrate these concepts.
15
-
16
- 4. **[API Reference](api_reference.md)**
17
- - The API Reference provides comprehensive details about public methods and classes within Agent99, ensuring developers can leverage its full capabilities.
18
-
19
- 5. **[Architecture Overview](architecture_overview.md)**
20
- - An overview of the architecture of Agent99, describing its microservices-oriented structure, communication workflows, and how agents operate within the system.
21
-
22
- 6. **[Configuration](configuration.md)**
23
- - Discover how to configure agents using environment variables, including important settings such as the registry base URL.
24
-
25
- 7. **[Control Actions](control_actions.md)**
26
- - This document lists the control actions available to agents, such as shutdown, pause, and resume, along with instructions on how to create custom actions.
27
-
28
- 8. **[Custom Agent Implementation](custom_agent_implementation.md)**
29
- - Guidelines on creating custom agents, including subclassing, defining schemas, and implementing request and response handling.
30
-
31
- 9. **[Error Handling and Logging](error_handling_and_logging.md)**
32
- - Understanding the error handling mechanisms in Agent99, as well as how to configure logging for better monitoring and debugging.
33
-
34
- 10. **[Extending the Framework](extending_the_framework.md)**
35
- - Instructions on how to extend Agent99 by implementing custom modules, defining new message types, and using hooks for additional functionality.
36
-
37
- 11. **[Message Processing](message_processing.md)**
38
- - This document outlines the different message types supported by Agent99, how they are processed, and the importance of schema validation.
39
-
40
- 12. **[Messaging Systems](messaging_systems.md)**
41
- - Overview of the messaging protocols supported by Agent99, including AMQP and NATS, and guidance on how to switch between them.
42
-
43
- 13. **[Advanced Features](advanced_features.md)**
44
- - Learn about dynamic agent loading, multi-agent processing, and best practices for running multiple agents within the same process.
45
-
46
- 14. **[Performance Considerations](performance_considerations.md)**
47
- - Best practices for ensuring optimal performance within the framework, including optimization techniques and profiling performance.
48
-
49
- 15. **[Schema Definition](schema_definition.md)**
50
- - Detailed instructions on how to define schemas using `SimpleJsonSchemaBuilder`, with examples to guide you through the process.
51
-
52
- 16. **[Security](security.md)**
53
- - Recommendations on implementing security measures within Agent99, focusing on message encryption and access control.
54
-
55
- 17. **[Troubleshooting](troubleshooting.md)**
56
- - Common issues encountered while using Agent99 and suggested steps for debugging, including examining logs and configuration settings.
57
-
@@ -1,42 +0,0 @@
1
- digraph AgentRegistration {
2
- rankdir=LR;
3
- node [shape=box, style=rounded];
4
- edge [fontsize=10];
5
-
6
- MyAgent [label="MyAgent"];
7
- RegistryClient [label="RegistryClient"];
8
- CentralRegistry [label="Central Registry\n(Sinatra Server)"];
9
-
10
- subgraph cluster_registration {
11
- label="Registration Process";
12
- color=lightgrey;
13
- style=filled;
14
-
15
- MyAgent -> RegistryClient [label="1. initialize"];
16
- RegistryClient -> CentralRegistry [label="2. POST /register\n{name, capabilities}"];
17
- CentralRegistry -> RegistryClient [label="3. 201 Created\n{uuid}"];
18
- RegistryClient -> MyAgent [label="4. Return uuid"];
19
- }
20
-
21
- subgraph cluster_discovery {
22
- label="Discovery Process";
23
- color=lightblue;
24
- style=filled;
25
-
26
- MyAgent -> RegistryClient [label="5. discover(capability)"];
27
- RegistryClient -> CentralRegistry [label="6. GET /discover?capability=..."];
28
- CentralRegistry -> RegistryClient [label="7. 200 OK\n[matching agents]"];
29
- RegistryClient -> MyAgent [label="8. Return matching agents"];
30
- }
31
-
32
- subgraph cluster_withdrawal {
33
- label="Withdrawal Process";
34
- color=lightpink;
35
- style=filled;
36
-
37
- MyAgent -> RegistryClient [label="9. withdraw(uuid)"];
38
- RegistryClient -> CentralRegistry [label="10. DELETE /withdraw/:uuid"];
39
- CentralRegistry -> RegistryClient [label="11. 204 No Content"];
40
- RegistryClient -> MyAgent [label="12. Confirm withdrawal"];
41
- }
42
- }
@@ -1,26 +0,0 @@
1
- digraph Agent99Architecture {
2
- rankdir=LR;
3
- node [shape=box, style=rounded];
4
-
5
- subgraph cluster_0 {
6
- label="Agent99 Framework";
7
- style=dashed;
8
-
9
- Agent1 [label="Agent 1\n(Client)"];
10
- Agent2 [label="Agent 2\n(Server)"];
11
- Agent3 [label="Agent 3\n(Hybrid)"];
12
- }
13
-
14
- Registry [shape=cylinder, label="Registry\nService"];
15
- MessageBroker [shape=diamond, label="Message Broker\n(AMQP/NATS)"];
16
-
17
- // Registration flows
18
- Agent1 -> Registry [label="register/discover", style=dashed];
19
- Agent2 -> Registry [label="register/discover", style=dashed];
20
- Agent3 -> Registry [label="register/discover", style=dashed];
21
-
22
- // Message flows
23
- Agent1 -> MessageBroker [dir=both, label="publish/subscribe"];
24
- Agent2 -> MessageBroker [dir=both, label="publish/subscribe"];
25
- Agent3 -> MessageBroker [dir=both, label="publish/subscribe"];
26
- }
@@ -1,42 +0,0 @@
1
- digraph RequestFlow {
2
- rankdir=TB;
3
- node [shape=box, style=rounded];
4
-
5
- // Message arrival and initial processing
6
- start [shape=oval, label="Message Arrives"];
7
- dispatch [label="dispatcher()\nMessage Processing Loop"];
8
- process [label="process_request(message)"];
9
- validate [label="validate_schema()"];
10
-
11
- // Main processing branch
12
- receive [label="receive_request()\nAgent Implementation"];
13
- send [label="send_response()\nOptional Response"];
14
-
15
- // Error handling branch
16
- error [label="Error Handler"];
17
- error_response [label="Send Error Response"];
18
-
19
- // Flow connections
20
- start -> dispatch;
21
- dispatch -> process;
22
- process -> validate;
23
-
24
- // Success path
25
- validate -> receive [label="Valid"];
26
- receive -> send [style=dashed];
27
-
28
- // Error path
29
- validate -> error [label="Invalid"];
30
- error -> error_response;
31
-
32
- // Styling
33
- {
34
- node [shape=note, style=filled, fillcolor=lightyellow];
35
- note1 [label="Schema validation\nensures message\nintegrity"];
36
- note2 [label="Custom processing\nin agent subclass"];
37
- }
38
-
39
- // Connect notes
40
- validate -> note1 [style=dotted, arrowhead=none];
41
- receive -> note2 [style=dotted, arrowhead=none];
42
- }
Binary file
File without changes