agent99 0.0.4 → 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 (92) hide show
  1. checksums.yaml +4 -4
  2. data/A2A_SPEC-dev.md +1829 -0
  3. data/CHANGELOG.md +31 -0
  4. data/COMMITS.md +196 -0
  5. data/DOCS.md +96 -0
  6. data/README.md +200 -78
  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/{control_actions.md → advanced-topics/control-actions.md} +2 -0
  15. data/docs/advanced-topics/model-context-protocol.md +4 -0
  16. data/docs/advanced-topics/multi-agent-processing.md +674 -0
  17. data/docs/agent-development/request-response-handling.md +512 -0
  18. data/docs/api-reference/agent99-base.md +463 -0
  19. data/docs/api-reference/message-clients.md +495 -0
  20. data/docs/api-reference/registry-client.md +470 -0
  21. data/docs/api-reference/schemas.md +518 -0
  22. data/docs/assets/css/custom.css +27 -0
  23. data/docs/assets/images/agent-lifecycle.svg +73 -0
  24. data/docs/assets/images/agent-registry-process.svg +86 -0
  25. data/docs/assets/images/agent-registry-processes.svg +114 -0
  26. data/docs/assets/images/agent-types-overview.svg +51 -0
  27. data/docs/assets/images/agent99-architecture.svg +85 -0
  28. data/docs/assets/images/agent99_logo.png +0 -0
  29. data/docs/assets/images/control-actions-state.svg +83 -0
  30. data/docs/assets/images/knowledge-graph.svg +77 -0
  31. data/docs/assets/images/message-processing-flow.svg +148 -0
  32. data/docs/assets/images/multi-agent-system.svg +66 -0
  33. data/docs/assets/images/proxy-pattern-sequence.svg +48 -0
  34. data/docs/assets/images/request-flow.svg +97 -0
  35. data/docs/assets/images/request-processing-lifecycle.svg +50 -0
  36. data/docs/assets/images/request-response-sequence.svg +39 -0
  37. data/docs/{agent_lifecycle.md → core-concepts/agent-lifecycle.md} +2 -0
  38. data/docs/core-concepts/agent-types.md +255 -0
  39. data/docs/{architecture.md → core-concepts/architecture.md} +5 -5
  40. data/docs/{what_is_an_agent.md → core-concepts/what-is-an-agent.md} +1 -1
  41. data/docs/diagrams/message-flow-sequence.svg +198 -0
  42. data/docs/diagrams/p2p-network-topology.svg +181 -0
  43. data/docs/diagrams/smart-transport-routing.svg +165 -0
  44. data/docs/diagrams/three-layer-architecture.svg +77 -0
  45. data/docs/diagrams/transport-extension-api.svg +309 -0
  46. data/docs/diagrams/transport-extension-architecture.svg +234 -0
  47. data/docs/diagrams/transport-selection-flowchart.svg +264 -0
  48. data/docs/examples/advanced-examples.md +951 -0
  49. data/docs/examples/basic-examples.md +268 -0
  50. data/docs/{agent_registry_processes.md → framework-components/agent-registry.md} +1 -1
  51. data/docs/{message_processing.md → framework-components/message-processing.md} +3 -1
  52. data/docs/getting-started/basic-example.md +306 -0
  53. data/docs/getting-started/installation.md +160 -0
  54. data/docs/getting-started/overview.md +64 -0
  55. data/docs/getting-started/quick-start.md +179 -0
  56. data/docs/index.md +97 -0
  57. data/examples/DEMO.md +148 -0
  58. data/examples/README.md +50 -0
  59. data/examples/bad_agent.rb +32 -0
  60. data/examples/registry.rb +0 -8
  61. data/examples/run_demo.rb +433 -0
  62. data/lib/agent99/amqp_message_client.rb +2 -2
  63. data/lib/agent99/base.rb +1 -1
  64. data/lib/agent99/message_processing.rb +6 -12
  65. data/lib/agent99/registry_client.rb +4 -1
  66. data/lib/agent99/version.rb +1 -1
  67. data/lib/agent99.rb +1 -1
  68. data/mkdocs.yml +195 -0
  69. data/p2p_plan.md +533 -0
  70. data/p2p_roadmap.md +299 -0
  71. data/registry_plan.md +1818 -0
  72. metadata +89 -32
  73. data/docs/README.md +0 -57
  74. data/docs/diagrams/agent_registry_processes.dot +0 -42
  75. data/docs/diagrams/agent_registry_processes.png +0 -0
  76. data/docs/diagrams/high_level_architecture.dot +0 -26
  77. data/docs/diagrams/high_level_architecture.png +0 -0
  78. data/docs/diagrams/request_flow.dot +0 -42
  79. data/docs/diagrams/request_flow.png +0 -0
  80. /data/docs/{advanced_features.md → advanced-topics/advanced-features.md} +0 -0
  81. /data/docs/{extending_the_framework.md → advanced-topics/extending-the-framework.md} +0 -0
  82. /data/docs/{custom_agent_implementation.md → agent-development/custom-agent-implementation.md} +0 -0
  83. /data/docs/{error_handling_and_logging.md → agent-development/error-handling-and-logging.md} +0 -0
  84. /data/docs/{schema_definition.md → agent-development/schema-definition.md} +0 -0
  85. /data/docs/{api_reference.md → api-reference/overview.md} +0 -0
  86. /data/docs/{agent_discovery.md → framework-components/agent-discovery.md} +0 -0
  87. /data/docs/{messaging_system.md → framework-components/messaging-system.md} +0 -0
  88. /data/docs/{breaking_change_v0.0.4.md → operations/breaking-changes.md} +0 -0
  89. /data/docs/{configuration.md → operations/configuration.md} +0 -0
  90. /data/docs/{preformance_considerations.md → operations/performance-considerations.md} +0 -0
  91. /data/docs/{security.md → operations/security.md} +0 -0
  92. /data/docs/{troubleshooting.md → operations/troubleshooting.md} +0 -0
data/CHANGELOG.md CHANGED
@@ -2,8 +2,39 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+
5
6
  ## Released
6
7
 
8
+ ### [0.0.5] 2025-09-03
9
+
10
+ #### Added
11
+ - Comprehensive demo runner (`examples/run_demo.rb`) for Agent99 framework with multiple scenarios
12
+ - Agent2Agent (A2A) protocol specification and documentation
13
+ - Model Context Protocol (MCP) documentation
14
+ - Hierarchical Temporal Memory (HTM) simulation and documentation
15
+ - GitHub Actions workflow for documentation deployment
16
+ - SQLite-based registry implementation
17
+ - Bad agent example for testing and security demonstrations
18
+ - HTM simulation script using SQLite database
19
+
20
+ #### Changed
21
+ - Updated README.md for improved clarity and structural improvements
22
+ - Improved control command handling in Control agent example
23
+ - Enhanced examples with better error handling and user experience
24
+ - Updated Gemfile.lock to reflect dependency upgrades
25
+
26
+ #### Fixed
27
+ - **[BREAKING FIX]** Disabled broken JsonSchema validation to prevent runtime crashes
28
+ - Schema validation now returns empty array instead of crashing with `NameError: uninitialized constant Agent99::MessageProcessing::JsonSchema`
29
+ - Added TODO comment for future proper schema validation implementation
30
+ - Fixed RabbitMQ dependency check hanging in demo runner
31
+ - Changed from `rabbitmq-server --help` to `which rabbitmq-server` for faster, non-blocking check
32
+ - Demo runner now properly handles infrastructure startup and cleanup
33
+
34
+ #### Removed
35
+ - Removed SQLite registry implementation (replaced with improved Sinatra-based registry)
36
+ - Removed debug statements from various components
37
+
7
38
  ### [0.0.4] 2024-12-14
8
39
 
9
40
  - This is a [breaking change](docs/breaking_change_v0.0.4.md)
data/COMMITS.md ADDED
@@ -0,0 +1,196 @@
1
+ ---
2
+ url: https://www.conventionalcommits.org/en/v1.0.0/
3
+ title: Conventional Commits
4
+ description: A specification for adding human and machine readable meaning to commit messages
5
+ access_date: 2025-07-31T20:51:29.000Z
6
+ current_date: 2025-07-31T20:51:29.601Z
7
+ ---
8
+
9
+ # Conventional Commits
10
+
11
+ A specification for adding human and machine readable meaning to commit messages
12
+
13
+ Quick Summary Full Specification Contribute
14
+
15
+ # Conventional Commits 1.0.0
16
+
17
+ ## Summary
18
+
19
+ The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.
20
+
21
+ The commit message should be structured as follows:
22
+
23
+ ---
24
+
25
+ ```
26
+ <type>[optional scope]: <description>
27
+
28
+ [optional body]
29
+
30
+ [optional footer(s)]
31
+
32
+ ```
33
+
34
+ ---
35
+
36
+ The commit contains the following structural elements, to communicate intent to the consumers of your library:
37
+
38
+ 1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with `PATCH` in Semantic Versioning).
39
+ 2. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with `MINOR` in Semantic Versioning).
40
+ 3. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with `MAJOR` in Semantic Versioning). A BREAKING CHANGE can be part of commits of any _type_.
41
+ 4. _types_ other than `fix:` and `feat:` are allowed, for example @commitlint/config-conventional (based on the Angular convention) recommends `build:`, `chore:`,`ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others.
42
+ 5. _footers_ other than `BREAKING CHANGE: <description>` may be provided and follow a convention similar to git trailer format.
43
+
44
+ Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE). A scope may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`.
45
+
46
+ ## Examples
47
+
48
+ ### Commit message with description and breaking change footer
49
+
50
+ ```
51
+ feat: allow provided config object to extend other configs
52
+
53
+ BREAKING CHANGE: `extends` key in config file is now used for extending other config files
54
+
55
+ ```
56
+
57
+ ### Commit message with `!` to draw attention to breaking change
58
+
59
+ ```
60
+ feat!: send an email to the customer when a product is shipped
61
+
62
+ ```
63
+
64
+ ### Commit message with scope and `!` to draw attention to breaking change
65
+
66
+ ```
67
+ feat(api)!: send an email to the customer when a product is shipped
68
+
69
+ ```
70
+
71
+ ### Commit message with both `!` and BREAKING CHANGE footer
72
+
73
+ ```
74
+ chore!: drop support for Node 6
75
+
76
+ BREAKING CHANGE: use JavaScript features not available in Node 6.
77
+
78
+ ```
79
+
80
+ ### Commit message with no body
81
+
82
+ ```
83
+ docs: correct spelling of CHANGELOG
84
+
85
+ ```
86
+
87
+ ### Commit message with scope
88
+
89
+ ```
90
+ feat(lang): add Polish language
91
+
92
+ ```
93
+
94
+ ### Commit message with multi-paragraph body and multiple footers
95
+
96
+ ```
97
+ fix: prevent racing of requests
98
+
99
+ Introduce a request id and a reference to latest request. Dismiss
100
+ incoming responses other than from latest request.
101
+
102
+ Remove timeouts which were used to mitigate the racing issue but are
103
+ obsolete now.
104
+
105
+ Reviewed-by: Z
106
+ Refs: #123
107
+
108
+ ```
109
+
110
+ ## Specification
111
+
112
+ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
113
+
114
+ 1. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed by the OPTIONAL scope, OPTIONAL `!`, and REQUIRED terminal colon and space.
115
+ 2. The type `feat` MUST be used when a commit adds a new feature to your application or library.
116
+ 3. The type `fix` MUST be used when a commit represents a bug fix for your application.
117
+ 4. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., `fix(parser):`
118
+ 5. A description MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were contained in string_.
119
+ 6. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.
120
+ 7. A commit body is free-form and MAY consist of any number of newline separated paragraphs.
121
+ 8. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of a word token, followed by either a `:<space>` or `<space>#` separator, followed by a string value (this is inspired by the git trailer convention).
122
+ 9. A footer’s token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token.
123
+ 10. A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed.
124
+ 11. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the footer.
125
+ 12. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g.,_BREAKING CHANGE: environment variables now take precedence over config files_.
126
+ 13. If included in the type/scope prefix, breaking changes MUST be indicated by a`!` immediately before the `:`. If `!` is used, `BREAKING CHANGE:` MAY be omitted from the footer section, and the commit description SHALL be used to describe the breaking change.
127
+ 14. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., _docs: update ref docs._
128
+ 15. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.
129
+ 16. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.
130
+
131
+ ## Why Use Conventional Commits
132
+
133
+ * Automatically generating CHANGELOGs.
134
+ * Automatically determining a semantic version bump (based on the types of commits landed).
135
+ * Communicating the nature of changes to teammates, the public, and other stakeholders.
136
+ * Triggering build and publish processes.
137
+ * Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.
138
+
139
+ ## FAQ
140
+
141
+ ### How should I deal with commit messages in the initial development phase?
142
+
143
+ We recommend that you proceed as if you’ve already released the product. Typically _somebody_, even if it’s your fellow software developers, is using your software. They’ll want to know what’s fixed, what breaks etc.
144
+
145
+ ### Are the types in the commit title uppercase or lowercase?
146
+
147
+ Any casing may be used, but it’s best to be consistent.
148
+
149
+ ### What do I do if the commit conforms to more than one of the commit types?
150
+
151
+ Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.
152
+
153
+ ### Doesn’t this discourage rapid development and fast iteration?
154
+
155
+ It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.
156
+
157
+ ### Might Conventional Commits lead developers to limit the type of commits they make because they’ll be thinking in the types provided?
158
+
159
+ Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.
160
+
161
+ ### How does this relate to SemVer?
162
+
163
+ `fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases.
164
+
165
+ ### How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`?
166
+
167
+ We recommend using SemVer to release your own extensions to this specification (and encourage you to make these extensions!)
168
+
169
+ ### What do I do if I accidentally use the wrong commit type?
170
+
171
+ #### When you used a type that’s of the spec but not the correct type, e.g. `fix` instead of `feat`
172
+
173
+ Prior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.
174
+
175
+ #### When you used a type _not_ of the spec, e.g. `feet` instead of `feat`
176
+
177
+ In a worst case scenario, it’s not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.
178
+
179
+ ### Do all my contributors need to use the Conventional Commits specification?
180
+
181
+ No! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they’re merged—adding no workload to casual committers. A common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.
182
+
183
+ ### How does Conventional Commits handle revert commits?
184
+
185
+ Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?
186
+
187
+ Conventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling authors to use the flexibility of _types_ and _footers_ to develop their logic for handling reverts.
188
+
189
+ One recommendation is to use the `revert` type, and a footer that references the commit SHAs that are being reverted:
190
+
191
+ ```
192
+ revert: let us never again speak of the noodle incident
193
+
194
+ Refs: 676104e, a215868
195
+
196
+ ```
data/DOCS.md ADDED
@@ -0,0 +1,96 @@
1
+ # Agent99 Documentation
2
+
3
+ This repository uses [MkDocs](https://www.mkdocs.org/) with the [Material theme](https://squidfunk.github.io/mkdocs-material/) to generate comprehensive documentation for the Agent99 framework.
4
+
5
+ ## 📚 Documentation Structure
6
+
7
+ ```
8
+ docs/
9
+ ├── index.md # Homepage
10
+ ├── getting-started/ # Installation and quick start guides
11
+ ├── core-concepts/ # Fundamental concepts and architecture
12
+ ├── framework-components/ # Deep dive into system components
13
+ ├── agent-development/ # Guide to building agents
14
+ ├── advanced-topics/ # Advanced features and protocols
15
+ ├── api-reference/ # API documentation
16
+ ├── operations/ # Configuration, security, troubleshooting
17
+ ├── examples/ # Code examples and tutorials
18
+ └── assets/ # Images, diagrams, and other assets
19
+ ```
20
+
21
+ ## 🚀 Building the Documentation
22
+
23
+ ### Prerequisites
24
+
25
+ Install MkDocs and required dependencies:
26
+
27
+ ```bash
28
+ pip install mkdocs mkdocs-material
29
+ ```
30
+
31
+ ### Build and Serve Locally
32
+
33
+ ```bash
34
+ # Serve the documentation locally (auto-reloads on changes)
35
+ mkdocs serve
36
+
37
+ # Build static documentation
38
+ mkdocs build
39
+
40
+ # Deploy to GitHub Pages (if configured)
41
+ mkdocs gh-deploy
42
+ ```
43
+
44
+ The documentation will be available at `http://localhost:8000` when serving locally.
45
+
46
+ ## 📖 Key Documentation Sections
47
+
48
+ - **[Getting Started](docs/getting-started/overview.md)** - New to Agent99? Start here!
49
+ - **[Core Concepts](docs/core-concepts/what-is-an-agent.md)** - Understand agents and architecture
50
+ - **[Framework Components](docs/framework-components/agent-registry.md)** - How the system works
51
+ - **[Agent Development](docs/agent-development/custom-agent-implementation.md)** - Build your own agents
52
+ - **[Examples](docs/examples/basic-examples.md)** - Working code examples
53
+
54
+ ## 🎨 Documentation Features
55
+
56
+ The documentation includes:
57
+
58
+ - **Navigation tabs** for easy browsing
59
+ - **Search functionality** with instant results
60
+ - **Code syntax highlighting** for Ruby and other languages
61
+ - **Mermaid diagram support** for architecture diagrams
62
+ - **Dark/light theme toggle** for comfortable reading
63
+ - **Mobile-responsive design** for all devices
64
+ - **Direct GitHub integration** for easy editing
65
+
66
+ ## 📝 Contributing to Documentation
67
+
68
+ 1. **Edit existing pages**: Navigate to the appropriate markdown file in the `docs/` directory
69
+ 2. **Add new pages**: Create new markdown files and update the navigation in `mkdocs.yml`
70
+ 3. **Add images**: Place images in `docs/assets/` and reference them with relative paths
71
+ 4. **Test changes**: Run `mkdocs serve` to preview your changes locally
72
+
73
+ ## 🔗 Links
74
+
75
+ - **Live Documentation**: [https://madbomber.github.io/agent99](https://madbomber.github.io/agent99) (when deployed)
76
+ - **Repository**: [https://github.com/MadBomber/agent99](https://github.com/MadBomber/agent99)
77
+ - **RubyGems**: [https://rubygems.org/gems/agent99](https://rubygems.org/gems/agent99)
78
+
79
+ ## 📋 Documentation TODO
80
+
81
+ Missing documentation files that should be created:
82
+
83
+ - `docs/getting-started/quick-start.md` - Quick setup guide
84
+ - `docs/getting-started/basic-example.md` - Step-by-step first agent
85
+ - `docs/core-concepts/agent-types.md` - Server, Client, Hybrid agents
86
+ - `docs/agent-development/request-response-handling.md` - Message handling patterns
87
+ - `docs/advanced-topics/multi-agent-processing.md` - Running multiple agents
88
+ - `docs/api-reference/agent99-base.md` - Core API documentation
89
+ - `docs/api-reference/registry-client.md` - Registry API docs
90
+ - `docs/api-reference/message-clients.md` - Messaging API docs
91
+ - `docs/api-reference/schemas.md` - Schema definitions
92
+ - `docs/examples/advanced-examples.md` - Complex examples
93
+
94
+ ---
95
+
96
+ *The documentation is organized to provide a clear learning path from basic concepts to advanced topics, making Agent99 accessible to developers at all levels.*
data/README.md CHANGED
@@ -1,64 +1,102 @@
1
1
  # Agent99
2
+ <br/>
3
+
4
+ > [!CAUTION]
5
+ > ## ⚠️ Under Development ⚠️
6
+ > Initial release has no AI components - it's a generic client-server / request-response micro-services system using peer-to-peer messaging and centralized agent registry. Review [The Changelog](./CHANGELOG.md) for version changes.
7
+ <br /><br />
8
+
9
+ <div align="center">
10
+ <table>
11
+ <tr>
12
+ <td width="40%" align="center" valign="top">
13
+ <img src="docs/assets/images/agent99_logo.png" alt="Agent99 - Ruby Framework for Intelligent Software Agents" width="1200">
14
+ <br /><br />
15
+ [Comprehensive Documentation Website](https://madbomber.github.io/agent99/)
16
+ </td>
17
+ <td width="60%" align="left" valign="top">
18
+ Agent99 is a Ruby-based framework for building and managing intelligent software agents in a distributed system. Like the clever Agent 99 from Get Smart, your agents will be smart, adaptable, and ready to tackle any challenge through seamless peer-to-peer communication and centralized discovery.
19
+ <br/><br/>
20
+ <h3>Key Features</h3>
21
+ <ul>
22
+ <li><strong>🌐 <a href="#agent-discovery">Agent Discovery</a></strong> - Find agents by capabilities</li>
23
+ <li><strong>📡 <a href="#flexible-communication">Peer-to-Peer Messaging</a></strong> - AMQP & NATS support</li>
24
+ <li><strong>🔄 <a href="#message-processing">Message Processing</a></strong> - Requests, responses & control</li>
25
+ <li><strong>📋 <a href="#registry-integration">Registry Integration</a></strong> - Centralized agent registry</li>
26
+ <li><strong>⚡ <a href="#control-actions">Control Actions</a></strong> - Pause, resume, update agents</li>
27
+ <li><strong>🔧 <a href="#agent-lifecycle-management">Lifecycle Management</a></strong> - Easy setup & teardown</li>
28
+ <li><strong>🚀 <a href="#multi-agent-processing">Multi-Agent Processing</a></strong> - Thread isolation support</li>
29
+ <li><strong>📊 <a href="#error-handling-and-logging">Error Handling & Logging</a></strong> - Built-in management</li>
30
+ </ul>
31
+ </td>
32
+ </tr>
33
+ </table>
34
+ </div>
35
+
36
+ ## Table of Contents
37
+
38
+ * [Quick Start](#quick-start)
39
+ * [Prerequisites](#prerequisites)
40
+ * [Architecture Overview](#architecture-overview)
41
+ * [Installation](#installation)
42
+ * [Usage](#usage)
43
+ * [Configuration](#configuration)
44
+ * [Agent Lifecycle](#agent-lifecycle)
45
+ * [Message Processing](#message-processing)
46
+ * [Registry Integration](#registry-integration)
47
+ * [Examples](#examples)
48
+ * [Evolving Standards](#evolving-standards)
49
+ * [Contributing](#contributing)
50
+ * [Roadmap](#roadmap)
51
+ * [License](#license)
52
+
53
+ ## Quick Start
54
+
55
+ Jump right in with our step-by-step guide:
56
+
57
+ 1. **Prerequisites**: [Install message broker](#prerequisites) (NATS or RabbitMQ)
58
+ 2. **Install Agent99**: Add to Gemfile and bundle install
59
+ 3. **Start Registry**: Launch the central agent registry
60
+ 4. **Create Your First Agent**: Build a simple greeter agent
61
+ 5. **Test Communication**: Verify agents can discover and communicate
62
+
63
+ 📖 **Detailed walkthrough**: [Getting Started Guide](docs/getting-started/quick-start.md)
64
+
65
+ ## Prerequisites
66
+
67
+ Agent99 requires a message broker for inter-agent communication. Choose one:
68
+
69
+ ### NATS (Recommended)
70
+ ```bash
71
+ # macOS
72
+ brew install nats-server
73
+
74
+ # Start NATS
75
+ nats-server
76
+ ```
2
77
 
3
- **Under Development** Initial release has no AI components - its just a generic client-server / request-response micro-services system using a peer-to-peer messaging broker and a centralized agent registry. To keep up with the version changes review [The Changelog](./CHANGELOG.md) file.
4
-
5
- v0.0.4 has a [breaking_change.](docs/breaking_change_v0.0.4.md)
6
-
7
- Agent99 is a Ruby-based framework for building and managing AI agents in a distributed system. It provides a robust foundation for creating intelligent agents that can communicate, discover each other, and perform various tasks.
8
-
9
- ## Hype!
10
-
11
- 🌟 **Introducing Agent99**: Your Friendly Ruby Sidekick for Building Intelligent Software Agents! 🌟
12
-
13
- Do you ever miss the charm and wit of Barbara Feldon's iconic character from *Get Smart*? Just as Agent 99 was always ready to tackle mischief and save the day, **Agent99** is here to help you create your very own software agents that can communicate, collaborate, and conquer tasks in a smart and efficient way!
14
-
15
- ### Why Choose Agent99?
16
-
17
- 🔍 **Independent Agents, Unified Communication**: Say goodbye to complex service orchestration! Agent99 empowers you to build micro-services that communicate seamlessly through a robust peer-to-peer messaging network. Each agent operates independently while working together like a well-oiled machine!
18
-
19
- 🤖 **Smart Automation for the Modern Age**: In the era of AI, why settle for less? With Agent99, you can develop software agents that respond intelligently to incoming requests—just like a secret agent reacting to their next mission! Deploy your own digital spies to gather data, complete tasks, and more.
20
-
21
- 📦 **Quick Setup & Easy Integration**: Just like Agent 99’s quick thinking, our library is designed for rapid development. Get up and running in no time, whether you’re building a small project or an enterprise-level solution!
22
-
23
-
24
- ### Features that Make Agent99 a Must-Have:
25
-
26
- - 🌐 **Peer-to-Peer Messaging**: Ensure that your agents can communicate effortlessly, just like Agent 99 and Max.
27
- - 🚀 **Agile Development**: Design and deploy agents at lightning speed, giving you the freedom to innovate.
28
- - 🔒 **Secure Communication**: Built with security in mind, because even our agents deserve to keep their secrets safe.
29
- - 📊 **Scalability**: Expand your network of agents as your needs grow—no mission is too big!
30
-
31
- ### Get Smart! Join the Revolution!
32
-
33
- Whether you’re a seasoned Ruby developer or just getting started, Agent99 provides the tools you need to build your very own quirky, intelligent agents. Just like Agent 99, your agents will be clever, adaptable, and ready to tackle any challenge!
34
-
35
- ### How to Get Started:
36
-
37
- 1. **Install**: Simply add Agent99 to your Gemfile and run `bundle install`.
38
- 2. **Create an Agent**: Use our simple API to define and deploy your first agent.
39
- 3. **Watch Them Work**: Sit back and relax as your agents spring into action, communicating with one another to accomplish tasks that would impress even the chief of CONTROL!
78
+ ### RabbitMQ
79
+ ```bash
80
+ # macOS
81
+ brew install rabbitmq
40
82
 
41
- ### Spread the Word!
83
+ # Start RabbitMQ
84
+ brew services start rabbitmq
85
+ ```
42
86
 
43
- **Join the Agent99 community** on GitHub and share your experiences, tips, and feedback. Let’s build a world of smart agents together! And remember, just like Agent 99 always had Max’s back, we’ve got yours during your development journey.
87
+ 📋 **More installation options**: [Installation Guide](docs/getting-started/installation.md)
44
88
 
45
- 🕵️‍♂️ **Become an Agent!** Dive into the world of Agent99 today: [GitHub Repository](#) 📖
89
+ ## Architecture Overview
46
90
 
47
- **Agent99** – Because when it comes to building software agents, it's all about being smart!
91
+ ![Agent99 Architecture](docs/assets/images/agent99-architecture.svg)
48
92
 
49
- ... end of the Hype; now back to normal.
93
+ Agent99 follows a distributed architecture with three core components:
50
94
 
51
- ## Features
95
+ - **🏛️ Central Registry**: Service discovery and agent registration
96
+ - **📡 Message Broker**: Peer-to-peer communication backbone (NATS/AMQP)
97
+ - **🤖 Agents**: Independent services with specific capabilities
52
98
 
53
- - Agent Lifecycle Management: Easy setup and teardown of agents
54
- - Message Processing: Handle requests, responses, and control messages
55
- - Agent Discovery: Find other agents based on capabilities
56
- - Flexible Communication: Support for both AMQP and NATS messaging systems
57
- - Registry Integration: Register and discover agents through a central registry
58
- - Error Handling and Logging: Built-in error management and logging capabilities
59
- - Control Actions: Pause, resume, update configuration, and request status of agents
60
- - Dynamic Agent Loading: Support for runtime loading and deployment of new agents
61
- - Multi-Agent Processing: Run multiple agents within the same process using thread isolation
99
+ 📚 **Deep dive**: [Architecture Documentation](docs/core-concepts/architecture.md)
62
100
 
63
101
  ## Installation
64
102
 
@@ -82,67 +120,151 @@ $ gem install agent99
82
120
 
83
121
  ## Usage
84
122
 
85
- Here's a basic example of how to create an AI agent:
123
+ Create your first agent in three simple steps:
86
124
 
125
+ ### 1. Define Request Schema
87
126
  ```ruby
88
- require 'agent99'
89
-
90
127
  class GreeterRequest < SimpleJsonSchemaBuilder::Base
91
128
  object do
92
129
  object :header, schema: Agent99::HeaderSchema
93
130
  string :name, required: true, examples: ["World"]
94
131
  end
95
132
  end
133
+ ```
96
134
 
135
+ ### 2. Implement Agent Class
136
+ ```ruby
97
137
  class GreeterAgent < Agent99::Base
98
138
  def info
99
139
  {
100
- name: self.class.to_s,
101
- type: :server,
102
- capabilities: ['greeter', 'hello_world'],
103
- request_schema: GreeterRequest.schema,
104
- # Uncomment and define these schemas as needed:
105
- # response_schema: {}, # Agent99::RESPONSE.schema
106
- # control_schema: {}, # Agent99::CONTROL.schema
107
- # error_schema: {}, # Agent99::ERROR.schema
140
+ name: self.class.to_s,
141
+ type: :server,
142
+ capabilities: ['greeter', 'hello_world'],
143
+ request_schema: GreeterRequest.schema
108
144
  }
109
145
  end
110
146
 
111
147
  def process_request(payload)
112
- name = payload.dig(:name)
113
- response = { result: "Hello, #{name}!" }
114
- send_response(response)
148
+ name = payload.dig(:name)
149
+ send_response(result: "Hello, #{name}!")
115
150
  end
116
151
  end
152
+ ```
117
153
 
118
- # Create and run the agent
154
+ ### 3. Run Your Agent
155
+ ```ruby
156
+ require 'agent99'
119
157
  agent = GreeterAgent.new
120
158
  agent.run
121
159
  ```
122
160
 
161
+ 🎯 **More examples**: [Usage Examples](docs/examples/)
162
+
123
163
  ## Configuration
124
164
 
125
- The framework can be configured through environment variables:
165
+ Configure Agent99 through environment variables:
166
+
167
+ ### Core Settings
168
+ - `AGENT99_REGISTRY_URL`: Registry service URL (default: `http://localhost:4567`)
169
+ - `AGENT99_LOG_LEVEL`: Logging verbosity (default: `INFO`)
126
170
 
127
- - `AGENT99_REGISTRY_URL`: URL of the agent registry service (default: 'http://localhost:4567')
171
+ ### NATS Configuration
172
+ - `NATS_URL`: NATS server URL (default: `nats://localhost:4222`)
173
+ - `NATS_USER`: Username for authentication
174
+ - `NATS_PASS`: Password for authentication
128
175
 
129
- Depending on which messaging client you are using, additional environment variables may be used.
176
+ ### AMQP/RabbitMQ Configuration
177
+ - `RABBITMQ_URL`: RabbitMQ server URL (default: `amqp://localhost:5672`)
178
+ - `RABBITMQ_USER`: Username (default: `guest`)
179
+ - `RABBITMQ_PASS`: Password (default: `guest`)
130
180
 
131
- TODO: show envars for AMQP via Bunny
132
- TODO: show envars for NATS via nats0server
181
+ 📚 **Complete configuration guide**: [Configuration Documentation](docs/configuration/)
182
+
183
+ ## Agent Lifecycle
184
+
185
+ ![Agent Lifecycle](docs/assets/images/agent-lifecycle.svg)
186
+
187
+ Agent99 manages the complete lifecycle of your agents:
188
+
189
+ - **🎬 Initialization**: Agent registers with the central registry
190
+ - **⚡ Running**: Agent processes requests and sends responses
191
+ - **⏸️ Paused**: Agent temporarily stops processing (control action)
192
+ - **🔄 Updated**: Agent receives new configuration or capabilities
193
+ - **🛑 Shutdown**: Agent gracefully disconnects and cleans up
194
+
195
+ 🔄 **Detailed lifecycle management**: [Agent Lifecycle Guide](docs/core-concepts/agent-lifecycle.md)
196
+
197
+ ## Message Processing
198
+
199
+ ![Message Processing Flow](docs/assets/images/message-processing-flow.svg)
200
+
201
+ Agent99 handles three types of messages:
202
+
203
+ - **📨 Requests**: Incoming work for agents to process
204
+ - **📤 Responses**: Results sent back to requesters
205
+ - **🎛️ Control**: Management commands (pause, resume, update)
206
+
207
+ Each message is validated, routed, and processed with full error handling and logging.
208
+
209
+ ⚙️ **Message processing details**: [Message Processing Guide](docs/framework-components/message-processing.md)
210
+
211
+ ## Registry Integration
212
+
213
+ ![Agent Registry Process](docs/assets/images/agent-registry-processes.svg)
214
+
215
+ The central registry enables dynamic service discovery:
216
+
217
+ 1. **📝 Registration**: Agents announce their capabilities
218
+ 2. **🔍 Discovery**: Find agents by capability or name
219
+ 3. **📋 Management**: Monitor and control registered agents
220
+ 4. **🚪 Withdrawal**: Clean removal from registry
221
+
222
+ The registry supports both HTTP REST API and direct client integration.
223
+
224
+ 🏛️ **Registry implementation**: [Registry Documentation](docs/framework-components/agent-registry.md)
225
+
226
+ ## Examples
227
+
228
+ Explore real-world implementations:
229
+
230
+ - **🚀 [Demo Runner](examples/run_demo.rb)**: Complete working system
231
+ - **👋 [Greeter Agent](examples/greeter_agent.rb)**: Simple request-response
232
+ - **🔄 [Multi-Agent System](examples/multi_agent/)**: Coordinated agents
233
+ - **📊 [Monitoring Dashboard](examples/dashboard/)**: Agent status monitoring
234
+
235
+ 💡 **All examples**: [Examples Directory](docs/examples/)
236
+
237
+ ## Evolving Standards
238
+
239
+ - [agntcy.org](https://agntcy.org) - Agency protocol initiative
240
+ - [Agent2Agent](https://a2a-protocol.org/latest/) - Linux Foundation protocol
133
241
 
134
- See the examples folder for a default registry service implementation.
135
242
 
136
243
  ## Contributing
137
244
 
138
245
  Bug reports and pull requests are welcome on GitHub at https://github.com/MadBomber/agent99.
139
246
 
140
- ## Short-term Roadmap
247
+ ## Roadmap
248
+
249
+ ### Short-term (v0.1.x)
250
+ - **🔍 Enhanced Discovery**: Semantic search with vector database (SQLite + embeddings)
251
+ - **📋 Schema Validation**: Complete request/response schema definitions
252
+ - **🤖 AI Integration**: RAG-enabled agents using prompts as tools
253
+ - **📊 Monitoring**: Built-in metrics and health checks
254
+
255
+ ### Medium-term (v0.2.x)
256
+ - **🔐 Security**: Authentication and authorization framework
257
+ - **⚡ Performance**: Connection pooling and message batching
258
+ - **🌍 Multi-broker**: Support for multiple message brokers simultaneously
259
+ - **📈 Scaling**: Load balancing and auto-scaling capabilities
260
+
261
+ ### Long-term (v1.0+)
262
+ - **🧠 Intelligence**: Built-in ML/AI capabilities
263
+ - **🔗 Interoperability**: Full Agent2Agent protocol compliance
264
+ - **☁️ Cloud-native**: Kubernetes operators and cloud integrations
265
+
266
+ ⚠️ **Breaking changes**: [Migration Guide v0.0.4](docs/breaking_change_v0.0.4.md)
141
267
 
142
- - In the example registry, replace the Array(Hash) datastore with sqlite3 with a vector table to support discovery using semantic search.
143
- - Treat the agent like a Tool w/r/t RAG for prompts.
144
- - Add AgentRequest schema to agent's info in the registry.
145
- - Add AgentResponse schema to define the `result` element in the response JSON payload
146
268
 
147
269
  ## License
148
270