bfa-irc-a-sdk 0.1.0.dev6__tar.gz → 0.2.0.dev8__tar.gz

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 (29) hide show
  1. {bfa_irc_a_sdk-0.1.0.dev6/bfa_irc_a_sdk.egg-info → bfa_irc_a_sdk-0.2.0.dev8}/PKG-INFO +80 -1
  2. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/README.md +79 -0
  3. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8/bfa_irc_a_sdk.egg-info}/PKG-INFO +80 -1
  4. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/pyproject.toml +1 -1
  5. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/LICENSE +0 -0
  6. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/LICENSE_MATRIX.md +0 -0
  7. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_irc_a_sdk.egg-info/SOURCES.txt +0 -0
  8. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_irc_a_sdk.egg-info/dependency_links.txt +0 -0
  9. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_irc_a_sdk.egg-info/entry_points.txt +0 -0
  10. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_irc_a_sdk.egg-info/requires.txt +0 -0
  11. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_irc_a_sdk.egg-info/top_level.txt +0 -0
  12. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/__init__.py +0 -0
  13. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/config.py +0 -0
  14. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/core/__init__.py +0 -0
  15. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/core/agent.py +0 -0
  16. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/core/gateway.py +0 -0
  17. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/core/interactive_agent.py +0 -0
  18. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/core/mcp.py +0 -0
  19. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/core/paseto.py +0 -0
  20. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/router/embedder.py +0 -0
  21. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/bfa_sdk/router/search.py +0 -0
  22. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/setup.cfg +0 -0
  23. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/tests/test_config.py +0 -0
  24. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/tests/test_core_wrappers.py +0 -0
  25. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/tests/test_embedder.py +0 -0
  26. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/tests/test_gateway.py +0 -0
  27. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/tests/test_interactive_agent.py +0 -0
  28. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/tests/test_irca_security.py +0 -0
  29. {bfa_irc_a_sdk-0.1.0.dev6 → bfa_irc_a_sdk-0.2.0.dev8}/tests/test_router.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bfa-irc-a-sdk
3
- Version: 0.1.0.dev6
3
+ Version: 0.2.0.dev8
4
4
  Summary: A generic Backend for Agents (BFA) SDK with FAISS semantic routing.
5
5
  Author: Sandro Garcia
6
6
  Classifier: Programming Language :: Python :: 3
@@ -109,6 +109,85 @@ irc-a-gateway
109
109
 
110
110
  ---
111
111
 
112
+ ## Quickstart (Hello World)
113
+
114
+ Let's build your first BFA network in 3 minutes!
115
+
116
+ ### 1. Start the Gateway
117
+ First, start the Gateway (the central semantic router) in your terminal:
118
+ ```bash
119
+ irc-a-gateway
120
+ ```
121
+ *The Gateway will start listening on `http://127.0.0.1:8000`.*
122
+
123
+ ### 2. Your first Agent (A2A)
124
+ Create a file named `my_agent.py`, paste this code, and run it with `python my_agent.py`:
125
+
126
+ ```python
127
+ import uvicorn
128
+ from bfa_sdk.core.agent import BFAAgent
129
+ from a2a.server.agent_execution.context import RequestContext
130
+
131
+ class WeatherAgent(BFAAgent):
132
+ def __init__(self):
133
+ super().__init__(
134
+ agent_id="weather_agent",
135
+ name="Weather Agent",
136
+ description="Expert agent in meteorology and weather.",
137
+ tags=["weather", "temperature", "rain", "forecast"],
138
+ examples=["will it rain today?", "what is the temperature?"],
139
+ url="http://127.0.0.1:8002",
140
+ gateway_url="http://127.0.0.1:8000"
141
+ )
142
+
143
+ async def run(self, user_message: str, context: RequestContext) -> str:
144
+ # Connect a real LLM here (OpenAI, Anthropic, etc.)
145
+ return f"I received your weather query: '{user_message}'. It's a beautiful day!"
146
+
147
+ agent = WeatherAgent()
148
+ app = agent.app
149
+
150
+ if __name__ == "__main__":
151
+ uvicorn.run(app, host="127.0.0.1", port=8002)
152
+ ```
153
+
154
+ ### 3. Your first Tools Server (MCP)
155
+ Create a file named `my_mcp.py`, paste this code, and run it with `python my_mcp.py`:
156
+
157
+ ```python
158
+ import uvicorn
159
+ import asyncio
160
+ import threading
161
+ from bfa_sdk.core.mcp import BFAMCP
162
+
163
+ mcp = BFAMCP("Weather Tools")
164
+
165
+ @mcp.tool(
166
+ name="get_temperature",
167
+ description="Returns the current temperature of a city.",
168
+ tags=["temperature", "degrees", "city"],
169
+ examples=["temperature in london", "degrees in new york"]
170
+ )
171
+ async def get_temperature(city: str) -> str:
172
+ return f"The temperature in {city} is 24°C."
173
+
174
+ # Auto-register with the Gateway
175
+ async def startup():
176
+ await asyncio.sleep(1)
177
+ await mcp.register_with_gateway("http://127.0.0.1:8000", "http://127.0.0.1:8003")
178
+
179
+ threading.Thread(target=lambda: asyncio.run(startup()), daemon=True).start()
180
+
181
+ app = mcp.app
182
+
183
+ if __name__ == "__main__":
184
+ uvicorn.run(app, host="127.0.0.1", port=8003)
185
+ ```
186
+
187
+ Done! You now have a Gateway, an Agent, and an MCP Server semantically connected and secured by DET tokens.
188
+
189
+ ---
190
+
112
191
  ## Docker Deployment (BFA Gateway Container)
113
192
 
114
193
  You can run the BFA Gateway (including its semantic search router and dark-mode management dashboard) as a containerized microservice using Docker or Docker Compose.
@@ -79,6 +79,85 @@ irc-a-gateway
79
79
 
80
80
  ---
81
81
 
82
+ ## Quickstart (Hello World)
83
+
84
+ Let's build your first BFA network in 3 minutes!
85
+
86
+ ### 1. Start the Gateway
87
+ First, start the Gateway (the central semantic router) in your terminal:
88
+ ```bash
89
+ irc-a-gateway
90
+ ```
91
+ *The Gateway will start listening on `http://127.0.0.1:8000`.*
92
+
93
+ ### 2. Your first Agent (A2A)
94
+ Create a file named `my_agent.py`, paste this code, and run it with `python my_agent.py`:
95
+
96
+ ```python
97
+ import uvicorn
98
+ from bfa_sdk.core.agent import BFAAgent
99
+ from a2a.server.agent_execution.context import RequestContext
100
+
101
+ class WeatherAgent(BFAAgent):
102
+ def __init__(self):
103
+ super().__init__(
104
+ agent_id="weather_agent",
105
+ name="Weather Agent",
106
+ description="Expert agent in meteorology and weather.",
107
+ tags=["weather", "temperature", "rain", "forecast"],
108
+ examples=["will it rain today?", "what is the temperature?"],
109
+ url="http://127.0.0.1:8002",
110
+ gateway_url="http://127.0.0.1:8000"
111
+ )
112
+
113
+ async def run(self, user_message: str, context: RequestContext) -> str:
114
+ # Connect a real LLM here (OpenAI, Anthropic, etc.)
115
+ return f"I received your weather query: '{user_message}'. It's a beautiful day!"
116
+
117
+ agent = WeatherAgent()
118
+ app = agent.app
119
+
120
+ if __name__ == "__main__":
121
+ uvicorn.run(app, host="127.0.0.1", port=8002)
122
+ ```
123
+
124
+ ### 3. Your first Tools Server (MCP)
125
+ Create a file named `my_mcp.py`, paste this code, and run it with `python my_mcp.py`:
126
+
127
+ ```python
128
+ import uvicorn
129
+ import asyncio
130
+ import threading
131
+ from bfa_sdk.core.mcp import BFAMCP
132
+
133
+ mcp = BFAMCP("Weather Tools")
134
+
135
+ @mcp.tool(
136
+ name="get_temperature",
137
+ description="Returns the current temperature of a city.",
138
+ tags=["temperature", "degrees", "city"],
139
+ examples=["temperature in london", "degrees in new york"]
140
+ )
141
+ async def get_temperature(city: str) -> str:
142
+ return f"The temperature in {city} is 24°C."
143
+
144
+ # Auto-register with the Gateway
145
+ async def startup():
146
+ await asyncio.sleep(1)
147
+ await mcp.register_with_gateway("http://127.0.0.1:8000", "http://127.0.0.1:8003")
148
+
149
+ threading.Thread(target=lambda: asyncio.run(startup()), daemon=True).start()
150
+
151
+ app = mcp.app
152
+
153
+ if __name__ == "__main__":
154
+ uvicorn.run(app, host="127.0.0.1", port=8003)
155
+ ```
156
+
157
+ Done! You now have a Gateway, an Agent, and an MCP Server semantically connected and secured by DET tokens.
158
+
159
+ ---
160
+
82
161
  ## Docker Deployment (BFA Gateway Container)
83
162
 
84
163
  You can run the BFA Gateway (including its semantic search router and dark-mode management dashboard) as a containerized microservice using Docker or Docker Compose.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bfa-irc-a-sdk
3
- Version: 0.1.0.dev6
3
+ Version: 0.2.0.dev8
4
4
  Summary: A generic Backend for Agents (BFA) SDK with FAISS semantic routing.
5
5
  Author: Sandro Garcia
6
6
  Classifier: Programming Language :: Python :: 3
@@ -109,6 +109,85 @@ irc-a-gateway
109
109
 
110
110
  ---
111
111
 
112
+ ## Quickstart (Hello World)
113
+
114
+ Let's build your first BFA network in 3 minutes!
115
+
116
+ ### 1. Start the Gateway
117
+ First, start the Gateway (the central semantic router) in your terminal:
118
+ ```bash
119
+ irc-a-gateway
120
+ ```
121
+ *The Gateway will start listening on `http://127.0.0.1:8000`.*
122
+
123
+ ### 2. Your first Agent (A2A)
124
+ Create a file named `my_agent.py`, paste this code, and run it with `python my_agent.py`:
125
+
126
+ ```python
127
+ import uvicorn
128
+ from bfa_sdk.core.agent import BFAAgent
129
+ from a2a.server.agent_execution.context import RequestContext
130
+
131
+ class WeatherAgent(BFAAgent):
132
+ def __init__(self):
133
+ super().__init__(
134
+ agent_id="weather_agent",
135
+ name="Weather Agent",
136
+ description="Expert agent in meteorology and weather.",
137
+ tags=["weather", "temperature", "rain", "forecast"],
138
+ examples=["will it rain today?", "what is the temperature?"],
139
+ url="http://127.0.0.1:8002",
140
+ gateway_url="http://127.0.0.1:8000"
141
+ )
142
+
143
+ async def run(self, user_message: str, context: RequestContext) -> str:
144
+ # Connect a real LLM here (OpenAI, Anthropic, etc.)
145
+ return f"I received your weather query: '{user_message}'. It's a beautiful day!"
146
+
147
+ agent = WeatherAgent()
148
+ app = agent.app
149
+
150
+ if __name__ == "__main__":
151
+ uvicorn.run(app, host="127.0.0.1", port=8002)
152
+ ```
153
+
154
+ ### 3. Your first Tools Server (MCP)
155
+ Create a file named `my_mcp.py`, paste this code, and run it with `python my_mcp.py`:
156
+
157
+ ```python
158
+ import uvicorn
159
+ import asyncio
160
+ import threading
161
+ from bfa_sdk.core.mcp import BFAMCP
162
+
163
+ mcp = BFAMCP("Weather Tools")
164
+
165
+ @mcp.tool(
166
+ name="get_temperature",
167
+ description="Returns the current temperature of a city.",
168
+ tags=["temperature", "degrees", "city"],
169
+ examples=["temperature in london", "degrees in new york"]
170
+ )
171
+ async def get_temperature(city: str) -> str:
172
+ return f"The temperature in {city} is 24°C."
173
+
174
+ # Auto-register with the Gateway
175
+ async def startup():
176
+ await asyncio.sleep(1)
177
+ await mcp.register_with_gateway("http://127.0.0.1:8000", "http://127.0.0.1:8003")
178
+
179
+ threading.Thread(target=lambda: asyncio.run(startup()), daemon=True).start()
180
+
181
+ app = mcp.app
182
+
183
+ if __name__ == "__main__":
184
+ uvicorn.run(app, host="127.0.0.1", port=8003)
185
+ ```
186
+
187
+ Done! You now have a Gateway, an Agent, and an MCP Server semantically connected and secured by DET tokens.
188
+
189
+ ---
190
+
112
191
  ## Docker Deployment (BFA Gateway Container)
113
192
 
114
193
  You can run the BFA Gateway (including its semantic search router and dark-mode management dashboard) as a containerized microservice using Docker or Docker Compose.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "bfa-irc-a-sdk"
7
- version = "0.1.0.dev6"
7
+ version = "0.2.0.dev8"
8
8
  description = "A generic Backend for Agents (BFA) SDK with FAISS semantic routing."
9
9
  readme = "README.md"
10
10
  authors = [