jarviscore-framework 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

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 (31) hide show
  1. examples/cloud_deployment_example.py +3 -3
  2. examples/{listeneragent_cognitive_discovery_example.py → customagent_cognitive_discovery_example.py} +6 -6
  3. examples/fastapi_integration_example.py +4 -4
  4. jarviscore/__init__.py +8 -11
  5. jarviscore/cli/smoketest.py +1 -1
  6. jarviscore/core/mesh.py +9 -0
  7. jarviscore/data/examples/cloud_deployment_example.py +3 -3
  8. jarviscore/data/examples/custom_profile_decorator.py +134 -0
  9. jarviscore/data/examples/custom_profile_wrap.py +168 -0
  10. jarviscore/data/examples/{listeneragent_cognitive_discovery_example.py → customagent_cognitive_discovery_example.py} +6 -6
  11. jarviscore/data/examples/fastapi_integration_example.py +4 -4
  12. jarviscore/docs/API_REFERENCE.md +32 -45
  13. jarviscore/docs/CHANGELOG.md +42 -0
  14. jarviscore/docs/CONFIGURATION.md +1 -1
  15. jarviscore/docs/CUSTOMAGENT_GUIDE.md +246 -153
  16. jarviscore/docs/GETTING_STARTED.md +186 -329
  17. jarviscore/docs/TROUBLESHOOTING.md +1 -1
  18. jarviscore/docs/USER_GUIDE.md +8 -9
  19. jarviscore/integrations/fastapi.py +4 -4
  20. jarviscore/p2p/peer_client.py +29 -2
  21. jarviscore/profiles/__init__.py +2 -4
  22. jarviscore/profiles/customagent.py +295 -74
  23. {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.1.dist-info}/METADATA +61 -46
  24. {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.1.dist-info}/RECORD +30 -29
  25. tests/test_13_dx_improvements.py +37 -37
  26. tests/test_15_llm_cognitive_discovery.py +18 -18
  27. tests/test_16_unified_dx_flow.py +3 -3
  28. jarviscore/profiles/listeneragent.py +0 -292
  29. {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.1.dist-info}/WHEEL +0 -0
  30. {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.1.dist-info}/licenses/LICENSE +0 -0
  31. {jarviscore_framework-0.3.0.dist-info → jarviscore_framework-0.3.1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jarviscore-framework
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Build autonomous AI agents in 3 lines of code. Production-ready orchestration with P2P mesh networking.
5
5
  Author-email: Ruth Mutua <mutuandinda82@gmail.com>, Muyukani Kizito <muyukani@prescottdata.io>
6
6
  Maintainer-email: Prescott Data <info@prescottdata.io>
@@ -26,6 +26,8 @@ Requires-Dist: pyzmq
26
26
  Requires-Dist: python-dotenv>=1.0.0
27
27
  Requires-Dist: aiohttp>=3.9.0
28
28
  Requires-Dist: beautifulsoup4>=4.12.0
29
+ Requires-Dist: fastapi>=0.104.0
30
+ Requires-Dist: uvicorn>=0.29.0
29
31
  Requires-Dist: anthropic>=0.18.0
30
32
  Requires-Dist: openai>=1.0.0
31
33
  Requires-Dist: google-genai>=1.0.0
@@ -47,13 +49,13 @@ Dynamic: license-file
47
49
 
48
50
  ## Features
49
51
 
50
- - **AutoAgent** - LLM generates and executes code from natural language
51
- - **CustomAgent** - Bring your own logic (LangChain, CrewAI, etc.)
52
- - **ListenerAgent** - API-first agents with background P2P (just implement handlers)
53
- - **P2P Mesh** - Agent discovery and communication via SWIM protocol
54
- - **Workflow Orchestration** - Dependencies, context passing, multi-step pipelines
55
- - **FastAPI Integration** - 3-line setup with JarvisLifespan
56
- - **Cloud Deployment** - Self-registering agents for Docker/K8s
52
+ - **AutoAgent** - LLM generates and executes code from natural language
53
+ - **CustomAgent** - Bring your own logic with P2P message handlers
54
+ - **P2P Mesh** - Agent discovery and communication via SWIM protocol
55
+ - **Workflow Orchestration** - Dependencies, context passing, multi-step pipelines
56
+ - **FastAPI Integration** - 3-line setup with JarvisLifespan
57
+ - **Cognitive Discovery** - LLM-ready peer descriptions for autonomous delegation
58
+ - **Cloud Deployment** - Self-registering agents for Docker/K8s
57
59
 
58
60
  ## Installation
59
61
 
@@ -97,7 +99,26 @@ results = await mesh.workflow("calc", [
97
99
  print(results[0]["output"]) # 3628800
98
100
  ```
99
101
 
100
- ### CustomAgent (Your Code)
102
+ ### CustomAgent + FastAPI (Recommended)
103
+
104
+ ```python
105
+ from fastapi import FastAPI
106
+ from jarviscore.profiles import CustomAgent
107
+ from jarviscore.integrations.fastapi import JarvisLifespan
108
+
109
+ class ProcessorAgent(CustomAgent):
110
+ role = "processor"
111
+ capabilities = ["processing"]
112
+
113
+ async def on_peer_request(self, msg):
114
+ # Handle requests from other agents
115
+ return {"result": msg.data.get("task", "").upper()}
116
+
117
+ # 3 lines to integrate with FastAPI
118
+ app = FastAPI(lifespan=JarvisLifespan(ProcessorAgent(), mode="p2p"))
119
+ ```
120
+
121
+ ### CustomAgent (Workflow Mode)
101
122
 
102
123
  ```python
103
124
  from jarviscore import Mesh
@@ -121,56 +142,50 @@ results = await mesh.workflow("demo", [
121
142
  print(results[0]["output"]) # [2, 4, 6]
122
143
  ```
123
144
 
124
- ### ListenerAgent + FastAPI (API-First)
145
+ ## Profiles
125
146
 
126
- ```python
127
- from fastapi import FastAPI
128
- from jarviscore.profiles import ListenerAgent
129
- from jarviscore.integrations.fastapi import JarvisLifespan
130
-
131
- class ProcessorAgent(ListenerAgent):
132
- role = "processor"
133
- capabilities = ["processing"]
134
-
135
- async def on_peer_request(self, msg):
136
- # Handle requests from other agents
137
- return {"result": msg.data.get("task", "").upper()}
138
-
139
- # That's it - 3 lines to integrate with FastAPI
140
- app = FastAPI(lifespan=JarvisLifespan(ProcessorAgent(), mode="p2p"))
141
- ```
147
+ | Profile | You Write | JarvisCore Handles |
148
+ |---------|-----------|-------------------|
149
+ | **AutoAgent** | System prompt | LLM code generation, sandboxed execution |
150
+ | **CustomAgent** | `on_peer_request()` and/or `execute_task()` | Mesh, discovery, routing, lifecycle |
142
151
 
143
152
  ## Execution Modes
144
153
 
145
- | Mode | Profile | Use Case |
146
- |------|---------|----------|
147
- | `autonomous` | AutoAgent | Single machine, LLM code generation |
148
- | `p2p` | CustomAgent, ListenerAgent | Agent-to-agent communication, swarms |
149
- | `distributed` | CustomAgent, ListenerAgent | Multi-node workflows + P2P |
154
+ | Mode | Use Case |
155
+ |------|----------|
156
+ | `autonomous` | Single machine, LLM code generation (AutoAgent) |
157
+ | `p2p` | Agent-to-agent communication, swarms (CustomAgent) |
158
+ | `distributed` | Multi-node workflows + P2P (CustomAgent) |
150
159
 
151
- ## What's New in 0.3.0
160
+ ## Framework Integration
152
161
 
153
- **Developer Experience Improvements:**
154
- - **ListenerAgent** - No more writing `run()` loops. Just implement `on_peer_request()` and `on_peer_notify()` handlers.
155
- - **JarvisLifespan** - FastAPI integration reduced from ~100 lines to 3 lines.
156
- - **Cognitive Discovery** - `peers.get_cognitive_context()` generates LLM-ready peer descriptions. No more hardcoded agent names in prompts.
162
+ JarvisCore is **async-first**. Best experience with async frameworks.
157
163
 
158
- **Cloud Deployment:**
159
- - **Self-Registration** - `agent.join_mesh()` lets agents join existing meshes without central orchestrator.
160
- - **Remote Visibility** - Agents on different nodes are automatically discovered and callable.
164
+ | Framework | Integration |
165
+ |-----------|-------------|
166
+ | **FastAPI** | `JarvisLifespan` (3 lines) |
167
+ | **aiohttp, Quart, Tornado** | Manual lifecycle (see docs) |
168
+ | **Flask, Django** | Background thread pattern (see docs) |
161
169
 
162
170
  ## Documentation
163
171
 
164
- - [User Guide](jarviscore/docs/USER_GUIDE.md) - Complete documentation
165
- - [Getting Started](jarviscore/docs/GETTING_STARTED.md) - 5-minute quickstart
166
- - [AutoAgent Guide](jarviscore/docs/AUTOAGENT_GUIDE.md) - LLM-powered agents
167
- - [CustomAgent Guide](jarviscore/docs/CUSTOMAGENT_GUIDE.md) - Bring your own code
168
- - [API Reference](jarviscore/docs/API_REFERENCE.md) - Detailed API docs
169
- - [Configuration](jarviscore/docs/CONFIGURATION.md) - Settings reference
172
+ Documentation is included with the package:
173
+
174
+ ```bash
175
+ python -c "import jarviscore; print(jarviscore.__path__[0] + '/docs')"
176
+ ```
177
+
178
+ **Available guides:**
179
+ - `GETTING_STARTED.md` - 5-minute quickstart
180
+ - `CUSTOMAGENT_GUIDE.md` - CustomAgent patterns and framework integration
181
+ - `AUTOAGENT_GUIDE.md` - LLM-powered agents
182
+ - `USER_GUIDE.md` - Complete documentation
183
+ - `API_REFERENCE.md` - Detailed API docs
184
+ - `CONFIGURATION.md` - Settings reference
170
185
 
171
186
  ## Version
172
187
 
173
- **0.3.0**
188
+ **0.4.0**
174
189
 
175
190
  ## License
176
191
 
@@ -1,15 +1,15 @@
1
1
  examples/autoagent_distributed_example.py,sha256=yXxabyqPqPc-CTroTf-0GAl63ln3zPRMhMYBEi1Tpsc,8586
2
2
  examples/calculator_agent_example.py,sha256=x7TrzE45WT_1DqwEnw8U3Fw56WpR9jBe3SLZz5vsKWc,2276
3
- examples/cloud_deployment_example.py,sha256=PhB9-3pGgVY_w2UkTlBLGma_JSVEhG6hInxCDODOKwg,5044
3
+ examples/cloud_deployment_example.py,sha256=R0WVtta6hi_yuhWVnnQ5X_wiztPSRLC2gfhoDMgUakw,5038
4
4
  examples/custom_profile_decorator.py,sha256=4EAgqXrT9an1f5AQ3cEWAhPvI_EeXbQq7O8ByunXb_M,4099
5
5
  examples/custom_profile_wrap.py,sha256=0NoQECVBEJOiL7Syr2QL73jnvj2XhGQZUhOvisqEQXw,5088
6
+ examples/customagent_cognitive_discovery_example.py,sha256=3A5ibpTL5GCwJtnvx2sbp_Da59uK_xhBf83HvxjdQy0,12952
6
7
  examples/customagent_distributed_example.py,sha256=_vt_2sqSCIdHgwuV4VQFzHzmC3bgemPrHFifeA5tRNE,13677
7
8
  examples/customagent_p2p_example.py,sha256=tWywC5abc1aYIyW2V6Xgr_XkjZdqzcOeLut3PnzUpB8,30669
8
- examples/fastapi_integration_example.py,sha256=BBWHwLCD6qYF56jkfW9cLIAWHCgx6EWyRpiRCwwr6D4,22470
9
- examples/listeneragent_cognitive_discovery_example.py,sha256=ycPj2UzN9AMgUInca0CJZF0tZ8x7BMP8Xk1dsHhMG78,12964
9
+ examples/fastapi_integration_example.py,sha256=e87ewAFQzTCrckZzkTpSl3Ajx30qL6Ws7ArfqussbSo,22462
10
10
  examples/multi_agent_workflow.py,sha256=Sygx3iEBM9WzorVMXqtiwn4rLYrW9BsxsiQSKceuzsE,4303
11
11
  examples/research_agent_example.py,sha256=phJ5AHNnZ_pxCfiKvHoTp_IFwOAW7VD1fRNHlXvfgj4,2287
12
- jarviscore/__init__.py,sha256=p_jA9o1KGmXiQS0iKZPVvFZjUZcz2OXR3mAfpYUWKuo,3609
12
+ jarviscore/__init__.py,sha256=S7nug9_fRGeOh5nNYBrlb-ty-uDt3cll9dvLbwCUJuY,3402
13
13
  jarviscore/adapter/__init__.py,sha256=fipq2XzgW3Us35tbFhs9B_ypoeEZeaP7bTsNPFFZVRk,1092
14
14
  jarviscore/adapter/decorator.py,sha256=ZY-WCF16EvtQWkra_6HNBKdTOJ0G5yvrD5PYKa6bcqk,12040
15
15
  jarviscore/adapter/wrapper.py,sha256=kU9nBiezU1M1dq9x5EjnAVHs_QjFFOFx7dR4TNyFdPk,9666
@@ -17,7 +17,7 @@ jarviscore/cli/__init__.py,sha256=OnpJ37xDcbh3jFhALLY1jimgp1mxlB1-VhsKhGS6TDY,12
17
17
  jarviscore/cli/__main__.py,sha256=GuIqW9NKJ3n70ei54ItzrBYEVaWG5dAWGxdu87w7YgI,829
18
18
  jarviscore/cli/check.py,sha256=eWvk6fkRsJ8hpgT60XUoAn_0nyzF0PFKRl65m7U9cxQ,13955
19
19
  jarviscore/cli/scaffold.py,sha256=LZhqOSUVO7ZgBZnu2M2pUsRmTXtInYfOVJDaPkVE0Ck,4898
20
- jarviscore/cli/smoketest.py,sha256=gNTlPfJYQYQesVNSqx0fOsIMtRIHUa5GWHRqWcibPQc,13772
20
+ jarviscore/cli/smoketest.py,sha256=lRmpBBgo4jWuf6wiEEl8n0rb6dYQnKZ-ud2kodPmoEM,13770
21
21
  jarviscore/config/__init__.py,sha256=ZLjbRHSi5azaDyoSOFr9cQ65J5Fvi56xI-WHdczc204,178
22
22
  jarviscore/config/settings.py,sha256=ueYpJAZxT1zoEPymzrn0OHAXZxQXBqSMs87VwolPdhg,3516
23
23
  jarviscore/context/__init__.py,sha256=FdMfHUPs1vDRDaz2WR_F3IJi9k4FIVBvsGVKD5dJBrQ,1171
@@ -26,27 +26,29 @@ jarviscore/context/jarvis_context.py,sha256=6ai2TjDE5PRiBxF5lTdyBMoK3b8wv6cr0a6q
26
26
  jarviscore/context/memory.py,sha256=taonyl24ZUe-NZ5VtvrxljNv6f_BebuH6VE7l0B9S7A,4442
27
27
  jarviscore/core/__init__.py,sha256=30K2aqZckYTRZupn6X-mGV2QDSqWCgJ1cpN6Zk1gqlQ,177
28
28
  jarviscore/core/agent.py,sha256=j76BGNwN6ATnjWujvBSz8Dvojz7W9AEzC7gxfs9xde4,15561
29
- jarviscore/core/mesh.py,sha256=XPAX_mRqpLj22vT9SI4MmyT65EQR9KxTEULqJ3BlHwk,22898
29
+ jarviscore/core/mesh.py,sha256=3d7CdWqZhED_t2tWAtB5nBjWuyxcTbMbCIy5tWpvLmU,23370
30
30
  jarviscore/core/profile.py,sha256=sTrGTxV9mAqbt5l3z0-BSNOeWzq8YDLR3mlaPFSgt1c,2190
31
31
  jarviscore/data/.env.example,sha256=TCPdye7tYNDOEpcgaEuzUsQ-H7m9G6rsyzNZV9IYQ9s,5156
32
32
  jarviscore/data/__init__.py,sha256=757nsqMkytYV0zXiM_mh3LqtGZZ1lgFuMzvaLrW51PM,151
33
33
  jarviscore/data/examples/autoagent_distributed_example.py,sha256=yXxabyqPqPc-CTroTf-0GAl63ln3zPRMhMYBEi1Tpsc,8586
34
34
  jarviscore/data/examples/calculator_agent_example.py,sha256=x7TrzE45WT_1DqwEnw8U3Fw56WpR9jBe3SLZz5vsKWc,2276
35
- jarviscore/data/examples/cloud_deployment_example.py,sha256=PhB9-3pGgVY_w2UkTlBLGma_JSVEhG6hInxCDODOKwg,5044
35
+ jarviscore/data/examples/cloud_deployment_example.py,sha256=R0WVtta6hi_yuhWVnnQ5X_wiztPSRLC2gfhoDMgUakw,5038
36
+ jarviscore/data/examples/custom_profile_decorator.py,sha256=4EAgqXrT9an1f5AQ3cEWAhPvI_EeXbQq7O8ByunXb_M,4099
37
+ jarviscore/data/examples/custom_profile_wrap.py,sha256=0NoQECVBEJOiL7Syr2QL73jnvj2XhGQZUhOvisqEQXw,5088
38
+ jarviscore/data/examples/customagent_cognitive_discovery_example.py,sha256=3A5ibpTL5GCwJtnvx2sbp_Da59uK_xhBf83HvxjdQy0,12952
36
39
  jarviscore/data/examples/customagent_distributed_example.py,sha256=_vt_2sqSCIdHgwuV4VQFzHzmC3bgemPrHFifeA5tRNE,13677
37
40
  jarviscore/data/examples/customagent_p2p_example.py,sha256=tWywC5abc1aYIyW2V6Xgr_XkjZdqzcOeLut3PnzUpB8,30669
38
- jarviscore/data/examples/fastapi_integration_example.py,sha256=BBWHwLCD6qYF56jkfW9cLIAWHCgx6EWyRpiRCwwr6D4,22470
39
- jarviscore/data/examples/listeneragent_cognitive_discovery_example.py,sha256=ycPj2UzN9AMgUInca0CJZF0tZ8x7BMP8Xk1dsHhMG78,12964
41
+ jarviscore/data/examples/fastapi_integration_example.py,sha256=e87ewAFQzTCrckZzkTpSl3Ajx30qL6Ws7ArfqussbSo,22462
40
42
  jarviscore/data/examples/multi_agent_workflow.py,sha256=Sygx3iEBM9WzorVMXqtiwn4rLYrW9BsxsiQSKceuzsE,4303
41
43
  jarviscore/data/examples/research_agent_example.py,sha256=phJ5AHNnZ_pxCfiKvHoTp_IFwOAW7VD1fRNHlXvfgj4,2287
42
- jarviscore/docs/API_REFERENCE.md,sha256=Izzo41VfrH2UtenMLzFk91HzPejTtBXdM6E_LoLqa0M,31837
44
+ jarviscore/docs/API_REFERENCE.md,sha256=kEhCehRupHmBiJfD0AYpEiyMKXKbUI70dELM__8eNWg,31573
43
45
  jarviscore/docs/AUTOAGENT_GUIDE.md,sha256=ftm8dymihs3Y9PZTZmSD9xRhlRFygfTZKm59Mz8zNRA,4618
44
- jarviscore/docs/CHANGELOG.md,sha256=aJmLEaey3SSnyf2cMR-mBRr23tbfnXc2v0Har_11VbY,3259
45
- jarviscore/docs/CONFIGURATION.md,sha256=gsYElB2XcoSPx_65ca-NBmIe1HY_KS1zQCeFORKZcyI,14910
46
- jarviscore/docs/CUSTOMAGENT_GUIDE.md,sha256=VXFhP5UH1cIYtTwklxVfpmDDko1GQbJvb0ZmEcSG5i4,67026
47
- jarviscore/docs/GETTING_STARTED.md,sha256=dyreT-eQCQwSIe1S4yu8XtDN8LzD2vOXXyTxE9wCEkI,19776
48
- jarviscore/docs/TROUBLESHOOTING.md,sha256=mFTNWIGToGWaHSthVDVtdpw5Y994mSLyv1UuAqzuWEM,11544
49
- jarviscore/docs/USER_GUIDE.md,sha256=DJQAC2luWvjhSxyAfMKo6T_ZLVEXBjZSmp61u2a5tyo,21078
46
+ jarviscore/docs/CHANGELOG.md,sha256=9nnQEVpfsdIkJKPPrjJsZoJI9VQ4clKGhLE1lrodeTs,4661
47
+ jarviscore/docs/CONFIGURATION.md,sha256=cJwSmegYug2E3W2-dwXT1PwKc05dES6opbUNegSELwc,14910
48
+ jarviscore/docs/CUSTOMAGENT_GUIDE.md,sha256=OYeID56PsOE4T-YktazT1_xfHUD2U2FOap_ZU-0poxE,72539
49
+ jarviscore/docs/GETTING_STARTED.md,sha256=w_t47M9kQcIG3N6tesMcjQgqpkV7PZOHAOXOSk8yGhE,15860
50
+ jarviscore/docs/TROUBLESHOOTING.md,sha256=YFXc4pjm3_5Ol38r5fxXh1JFKBAlp14lOhIIe8zg12g,11544
51
+ jarviscore/docs/USER_GUIDE.md,sha256=TpiRtyHG_bC0WT3JiwobbeKYaNVnF0u8UT-yZ30pMz8,20951
50
52
  jarviscore/execution/__init__.py,sha256=yDAMehMO2dVvdKjxVx7zQV2AaxySmvymA24QF3O9tlY,1754
51
53
  jarviscore/execution/code_registry.py,sha256=C3_hAVXIeCG31qwSBUrmBBicmd2vnUrXJhJgj8MKlJw,9213
52
54
  jarviscore/execution/generator.py,sha256=zY7IxxDu4xoifeuCGZZN8_l8zQCsB5eUO9HGIiLIttw,8696
@@ -56,7 +58,7 @@ jarviscore/execution/result_handler.py,sha256=7SKr-teFksqNgejhnZNrjAzKbtDXbOSV3T
56
58
  jarviscore/execution/sandbox.py,sha256=IVkccce_WHDxXO6l8BCcuxAB5iueJfYtbryydoE972c,19981
57
59
  jarviscore/execution/search.py,sha256=JSoT8vb_yT6_EKaAgUQDS8ONgFeKf6s8YlEeTn6FaWQ,9923
58
60
  jarviscore/integrations/__init__.py,sha256=2Nfn0b_Cpw3Zf64ePYrKTk8PIVqjxK3YGHD4iIURE4A,437
59
- jarviscore/integrations/fastapi.py,sha256=QBhbnSRYEswl0q94BUt_bbjwa91XekG8czTfGi8tDmY,9238
61
+ jarviscore/integrations/fastapi.py,sha256=fEEHUStGougihJTpHmXmkOcBvRyGElVoMdz7RBq9oRw,9230
60
62
  jarviscore/orchestration/__init__.py,sha256=Ia9GfEMWif0tN0Ju89q6M_x_BRw9FcQl5Rf99p8CIKU,386
61
63
  jarviscore/orchestration/claimer.py,sha256=ekhHqhtxpi_USnPsIioFK6bA2nhH6jalulBkptYubVU,3106
62
64
  jarviscore/orchestration/dependency.py,sha256=UtSSwSC2Ak5V5dYeZWJy3wZZuTE-Y-fcglkoIgNT_70,4377
@@ -67,14 +69,13 @@ jarviscore/p2p/broadcaster.py,sha256=Gaj0nCHDBQrVe4ob4GcaFSqnAaVe3ugEILslc5Mq1qE
67
69
  jarviscore/p2p/coordinator.py,sha256=UtsSVSigIhs2Rcx1v5BVdLC11P649u71y8Bw4cU1fMk,30087
68
70
  jarviscore/p2p/keepalive.py,sha256=it0SyXVBmujfE79thrap-A1UxZW01p9ENEIglIbQoAM,14988
69
71
  jarviscore/p2p/messages.py,sha256=nd7ZutZ1Xge2C1KkRSwQK3RJ03ScxqESF3fl48hEkhI,2540
70
- jarviscore/p2p/peer_client.py,sha256=CFOpZ3OUev1W3apD5EaM4uigx5yshhAjNjDEDUJIXMo,31545
72
+ jarviscore/p2p/peer_client.py,sha256=hC21-ecE6edcaxKXhxTnikt0aV5CV-TDNcCuvhSgAcI,32713
71
73
  jarviscore/p2p/peer_tool.py,sha256=qXiF0b2pTo8tJ8bUHxe_XbxE0UFgwu2wCpy-W82ocUo,9098
72
74
  jarviscore/p2p/swim_manager.py,sha256=mu9clcJ22gqSOoeWlr4QW9b4vhRvD6QEAlTjAVVZvV4,11126
73
- jarviscore/profiles/__init__.py,sha256=Nxpa31ZZglybHP_2UC2U2ilnQ5GPgJXx4T3uH5QsfnY,455
75
+ jarviscore/profiles/__init__.py,sha256=gg2_T7ONl5se6rCSXLo-OlA3yOzmyHZPaNLzB6zjolE,328
74
76
  jarviscore/profiles/autoagent.py,sha256=1nJAVf1oU9lLO47BP1xFGBDZtypXXkwKy6kZjtpdlX0,10424
75
- jarviscore/profiles/customagent.py,sha256=GRauTYlWyYSgZrWyYZlAPNkJoVgjDHjfY_c0rdeoOgM,4618
76
- jarviscore/profiles/listeneragent.py,sha256=B4XCdk0T5j6amZmqYztE1m2GCk02ynK5DOdA3VhgHpg,11221
77
- jarviscore_framework-0.3.0.dist-info/licenses/LICENSE,sha256=SjsXanvmQJFYz_SVFa17O85-bKIa_aG99wrkPpWtypo,1101
77
+ jarviscore/profiles/customagent.py,sha256=zGt0RMnMbyyWeXtbQkHdvk1-dMweuNVjPTnH0-mZdaU,13906
78
+ jarviscore_framework-0.3.1.dist-info/licenses/LICENSE,sha256=SjsXanvmQJFYz_SVFa17O85-bKIa_aG99wrkPpWtypo,1101
78
79
  test_logs/code_registry/functions/data_generator-558779ed_560ebc37.py,sha256=ua0Lueqe1mWCeMpKTMaumfPS-ZrWBFF_Zx6TU5QVjNo,132
79
80
  test_logs/code_registry/functions/data_generator-5ed3609e_560ebc37.py,sha256=ua0Lueqe1mWCeMpKTMaumfPS-ZrWBFF_Zx6TU5QVjNo,132
80
81
  test_logs/code_registry/functions/data_generator-66da0356_43970bb9.py,sha256=vOkjCOcfXHLJX2TkR3et9vWSwEhCmOn4DdJHMGfTMVY,733
@@ -125,10 +126,10 @@ tests/test_07_distributed_single_node.py,sha256=rFL4FmD5-4MVfgnQ5FwAlIm2FFEdmNOB
125
126
  tests/test_08_distributed_multi_node.py,sha256=GkznK1f9aDEFF5_37WhBh553Ov6bw7IDOAvngo4848I,18039
126
127
  tests/test_09_distributed_autoagent.py,sha256=sg5KpHdiYyqQpKAPLNrjkaH4Ur6N8rwYrhbgiCe_KH8,20328
127
128
  tests/test_10_distributed_customagent.py,sha256=ZtmZYHPHvW6wPdt3lveixSPm6GO1Fm3v6TCdox6YI6c,29728
128
- tests/test_13_dx_improvements.py,sha256=rhmTFResVBAx3Vz-C0HDkt1E6tOAUS2GuQG9SRy1HIQ,20332
129
+ tests/test_13_dx_improvements.py,sha256=t3xoWdRBq5o2j90i-kZCJYc9AwW9F0lsB-9Y4VhISiI,20301
129
130
  tests/test_14_cloud_deployment.py,sha256=EaqJ9Cai9Ki61dhmeqNgMfEkWGnL8-aQg52CKZ6335I,16402
130
- tests/test_15_llm_cognitive_discovery.py,sha256=UD0PNDSxQ6yy261yEfq3vf4moYYpQSRs3WI5P-tJ7eo,26381
131
- tests/test_16_unified_dx_flow.py,sha256=XLLcpvEi40pJMw_7ifsP7udGxnQUIMZ6hvc81DvOuUw,38237
131
+ tests/test_15_llm_cognitive_discovery.py,sha256=AvBtuIPgiI5Z4skpoEjBOP6XwJukAJy7nR08HP-Gl5M,26331
132
+ tests/test_16_unified_dx_flow.py,sha256=fRqIwhXfkioEY1Wri2vNuxUvLYDy4FvwdRkOqAnffXs,38249
132
133
  tests/test_agent.py,sha256=qx9SFDTP4DlcQi6hV8y6LZyEYX6IB8D3VnM7fODnW9s,5182
133
134
  tests/test_autoagent.py,sha256=_mzinLdQwskOn6a-yGqdfoOsqw2f52XSyTCmj8hLqlg,4628
134
135
  tests/test_autoagent_day4.py,sha256=TTb0kSImF9stMsq4cMlkGahf9UBpYjoNXAkgnkKuuQA,4719
@@ -140,7 +141,7 @@ tests/test_llm_fallback.py,sha256=CNajpKkQ6MO503dRbgaP2cz9kXHwUGKo5381tHKTe4c,57
140
141
  tests/test_mesh.py,sha256=JmAAvZaduQ8dHThFDBYgUnjiz8a3r4Kt1atvdH1JO5I,11857
141
142
  tests/test_p2p_integration.py,sha256=F9B21eWlwRzSRphm2Kacs9nM1FgSbSzi6RSLPDvvt2U,10995
142
143
  tests/test_remote_sandbox.py,sha256=80ebc0pWInauWnywsQ0VSzlk8OexSCgGL7BcJUCPkR8,3268
143
- jarviscore_framework-0.3.0.dist-info/METADATA,sha256=W1VITOJ59DKyADAX-GWifmhKzrgfCCwOJqWFHehKyuU,5945
144
- jarviscore_framework-0.3.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
145
- jarviscore_framework-0.3.0.dist-info/top_level.txt,sha256=aTco8nlqDftlvhB43Je0xXmb-Pw5qYgj-phawjHX4VY,36
146
- jarviscore_framework-0.3.0.dist-info/RECORD,,
144
+ jarviscore_framework-0.3.1.dist-info/METADATA,sha256=4dF2CJq_tMCtHyWoIVbr_Z9Igx-PKh_eP86jKMAAyxc,5876
145
+ jarviscore_framework-0.3.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
146
+ jarviscore_framework-0.3.1.dist-info/top_level.txt,sha256=aTco8nlqDftlvhB43Je0xXmb-Pw5qYgj-phawjHX4VY,36
147
+ jarviscore_framework-0.3.1.dist-info/RECORD,,
@@ -1,9 +1,9 @@
1
1
  """
2
- Test 13: DX Improvements - FastAPI Integration, ListenerAgent, Cognitive Context
2
+ Test 13: DX Improvements - FastAPI Integration, CustomAgent Handlers, Cognitive Context
3
3
 
4
4
  Tests the Developer Experience improvements:
5
5
  - JarvisLifespan for FastAPI integration
6
- - ListenerAgent profile for API-first agents
6
+ - CustomAgent profile with P2P message handlers
7
7
  - Cognitive context generation for LLM prompts
8
8
 
9
9
  Run with: pytest tests/test_13_dx_improvements.py -v -s
@@ -127,22 +127,22 @@ class TestJarvisLifespan:
127
127
 
128
128
 
129
129
  # ═══════════════════════════════════════════════════════════════════════════════
130
- # TEST: LISTENER AGENT PROFILE
130
+ # TEST: CUSTOMAGENT P2P HANDLERS
131
131
  # ═══════════════════════════════════════════════════════════════════════════════
132
132
 
133
- class TestListenerAgent:
134
- """Test ListenerAgent profile."""
133
+ class TestCustomAgentHandlers:
134
+ """Test CustomAgent P2P message handlers."""
135
135
 
136
136
  @pytest.mark.asyncio
137
- async def test_listener_dispatches_request_to_handler(self):
138
- """Test ListenerAgent dispatches REQUEST messages to on_peer_request."""
139
- from jarviscore.profiles import ListenerAgent
137
+ async def test_customagent_dispatches_request_to_handler(self):
138
+ """Test CustomAgent dispatches REQUEST messages to on_peer_request."""
139
+ from jarviscore.profiles import CustomAgent
140
140
  from jarviscore.p2p.messages import IncomingMessage, MessageType
141
141
 
142
142
  request_received = False
143
143
  request_data = None
144
144
 
145
- class TestListener(ListenerAgent):
145
+ class TestAgent(CustomAgent):
146
146
  role = "listener"
147
147
  capabilities = ["listening"]
148
148
 
@@ -152,7 +152,7 @@ class TestListenerAgent:
152
152
  request_data = msg.data
153
153
  return {"handled": True, "echo": msg.data.get("value")}
154
154
 
155
- agent = TestListener()
155
+ agent = TestAgent()
156
156
  agent._logger = MagicMock()
157
157
 
158
158
  # Mock peers
@@ -182,15 +182,15 @@ class TestListenerAgent:
182
182
  assert call_args[0][1] == {"handled": True, "echo": 42}
183
183
 
184
184
  @pytest.mark.asyncio
185
- async def test_listener_dispatches_notify_to_handler(self):
186
- """Test ListenerAgent dispatches NOTIFY messages to on_peer_notify."""
187
- from jarviscore.profiles import ListenerAgent
185
+ async def test_customagent_dispatches_notify_to_handler(self):
186
+ """Test CustomAgent dispatches NOTIFY messages to on_peer_notify."""
187
+ from jarviscore.profiles import CustomAgent
188
188
  from jarviscore.p2p.messages import IncomingMessage, MessageType
189
189
 
190
190
  notify_received = False
191
191
  notify_data = None
192
192
 
193
- class TestListener(ListenerAgent):
193
+ class TestAgent(CustomAgent):
194
194
  role = "listener"
195
195
  capabilities = ["listening"]
196
196
 
@@ -202,7 +202,7 @@ class TestListenerAgent:
202
202
  notify_received = True
203
203
  notify_data = msg.data
204
204
 
205
- agent = TestListener()
205
+ agent = TestAgent()
206
206
  agent._logger = MagicMock()
207
207
 
208
208
  # Create test notify message
@@ -221,12 +221,12 @@ class TestListenerAgent:
221
221
  assert notify_data == {"event": "task_complete", "result": "success"}
222
222
 
223
223
  @pytest.mark.asyncio
224
- async def test_listener_auto_respond_disabled(self):
225
- """Test ListenerAgent respects auto_respond=False setting."""
226
- from jarviscore.profiles import ListenerAgent
224
+ async def test_customagent_auto_respond_disabled(self):
225
+ """Test CustomAgent respects auto_respond=False setting."""
226
+ from jarviscore.profiles import CustomAgent
227
227
  from jarviscore.p2p.messages import IncomingMessage, MessageType
228
228
 
229
- class TestListener(ListenerAgent):
229
+ class TestAgent(CustomAgent):
230
230
  role = "listener"
231
231
  capabilities = ["listening"]
232
232
  auto_respond = False # Disable auto response
@@ -234,7 +234,7 @@ class TestListenerAgent:
234
234
  async def on_peer_request(self, msg):
235
235
  return {"result": "this should not be sent automatically"}
236
236
 
237
- agent = TestListener()
237
+ agent = TestAgent()
238
238
  agent._logger = MagicMock()
239
239
  agent.peers = MagicMock()
240
240
  agent.peers.respond = AsyncMock()
@@ -254,15 +254,15 @@ class TestListenerAgent:
254
254
  agent.peers.respond.assert_not_called()
255
255
 
256
256
  @pytest.mark.asyncio
257
- async def test_listener_error_handling(self):
258
- """Test ListenerAgent calls on_error when handler raises exception."""
259
- from jarviscore.profiles import ListenerAgent
257
+ async def test_customagent_error_handling(self):
258
+ """Test CustomAgent calls on_error when handler raises exception."""
259
+ from jarviscore.profiles import CustomAgent
260
260
  from jarviscore.p2p.messages import IncomingMessage, MessageType
261
261
 
262
262
  error_received = None
263
263
  error_msg = None
264
264
 
265
- class TestListener(ListenerAgent):
265
+ class TestAgent(CustomAgent):
266
266
  role = "listener"
267
267
  capabilities = ["listening"]
268
268
 
@@ -274,7 +274,7 @@ class TestListenerAgent:
274
274
  error_received = error
275
275
  error_msg = msg
276
276
 
277
- agent = TestListener()
277
+ agent = TestAgent()
278
278
  agent._logger = MagicMock()
279
279
  agent.peers = MagicMock()
280
280
 
@@ -295,11 +295,11 @@ class TestListenerAgent:
295
295
  assert error_msg is not None
296
296
 
297
297
  @pytest.mark.asyncio
298
- async def test_listener_workflow_compatibility(self):
299
- """Test ListenerAgent.execute_task() delegates to on_peer_request."""
300
- from jarviscore.profiles import ListenerAgent
298
+ async def test_customagent_workflow_compatibility(self):
299
+ """Test CustomAgent.execute_task() delegates to on_peer_request."""
300
+ from jarviscore.profiles import CustomAgent
301
301
 
302
- class TestListener(ListenerAgent):
302
+ class TestAgent(CustomAgent):
303
303
  role = "processor"
304
304
  capabilities = ["processing"]
305
305
 
@@ -307,7 +307,7 @@ class TestListenerAgent:
307
307
  task = msg.data.get("task", "")
308
308
  return {"processed": task.upper()}
309
309
 
310
- agent = TestListener()
310
+ agent = TestAgent()
311
311
  agent._logger = MagicMock()
312
312
 
313
313
  result = await agent.execute_task({"task": "hello world"})
@@ -500,21 +500,21 @@ class TestCognitiveContext:
500
500
 
501
501
 
502
502
  # ═══════════════════════════════════════════════════════════════════════════════
503
- # TEST: INTEGRATION - ListenerAgent + JarvisLifespan
503
+ # TEST: INTEGRATION - CustomAgent + JarvisLifespan
504
504
  # ═══════════════════════════════════════════════════════════════════════════════
505
505
 
506
- class TestListenerAgentWithFastAPI:
507
- """Integration test for ListenerAgent with FastAPI lifespan."""
506
+ class TestCustomAgentWithFastAPI:
507
+ """Integration test for CustomAgent with FastAPI lifespan."""
508
508
 
509
509
  @pytest.mark.asyncio
510
- async def test_listener_agent_in_fastapi_lifespan(self):
511
- """Test ListenerAgent works correctly with JarvisLifespan."""
512
- from jarviscore.profiles import ListenerAgent
510
+ async def test_customagent_in_fastapi_lifespan(self):
511
+ """Test CustomAgent works correctly with JarvisLifespan."""
512
+ from jarviscore.profiles import CustomAgent
513
513
  from jarviscore.integrations.fastapi import JarvisLifespan
514
514
 
515
515
  messages_received = []
516
516
 
517
- class APIAgent(ListenerAgent):
517
+ class APIAgent(CustomAgent):
518
518
  role = "api_processor"
519
519
  capabilities = ["api_processing"]
520
520
  listen_timeout = 0.1 # Fast timeout for test
@@ -201,19 +201,19 @@ class TestCognitiveContextWithRealMesh:
201
201
  # TEST: LISTENERAGENT PEER COMMUNICATION
202
202
  # ═══════════════════════════════════════════════════════════════════════════════
203
203
 
204
- class TestListenerAgentPeerCommunication:
205
- """Test ListenerAgent handles peer requests correctly."""
204
+ class TestCustomAgentPeerCommunication:
205
+ """Test CustomAgent handles peer requests correctly."""
206
206
 
207
207
  @pytest.mark.asyncio
208
- async def test_listener_agent_receives_and_responds(self):
209
- """Test ListenerAgent receives requests and sends responses."""
208
+ async def test_customagent_receives_and_responds(self):
209
+ """Test CustomAgent receives requests and sends responses."""
210
210
  from jarviscore import Mesh
211
- from jarviscore.profiles import ListenerAgent, CustomAgent
211
+ from jarviscore.profiles import CustomAgent
212
212
 
213
213
  request_received = False
214
214
  request_data = None
215
215
 
216
- class ResponderAgent(ListenerAgent):
216
+ class ResponderAgent(CustomAgent):
217
217
  role = "responder"
218
218
  capabilities = ["responding"]
219
219
  listen_timeout = 0.1
@@ -273,9 +273,9 @@ class TestListenerAgentPeerCommunication:
273
273
  async def test_cognitive_context_enables_peer_discovery_for_requests(self):
274
274
  """Test that cognitive context helps discover correct peer for requests."""
275
275
  from jarviscore import Mesh
276
- from jarviscore.profiles import ListenerAgent
276
+ from jarviscore.profiles import CustomAgent
277
277
 
278
- class AnalystAgent(ListenerAgent):
278
+ class AnalystAgent(CustomAgent):
279
279
  role = "analyst"
280
280
  capabilities = ["data_analysis", "statistics"]
281
281
  description = "Expert in data analysis"
@@ -285,7 +285,7 @@ class TestListenerAgentPeerCommunication:
285
285
  query = msg.data.get("query", "")
286
286
  return {"analysis": f"Analyzed: {query}", "confidence": 0.9}
287
287
 
288
- class CoordinatorAgent(ListenerAgent):
288
+ class CoordinatorAgent(CustomAgent):
289
289
  role = "coordinator"
290
290
  capabilities = ["coordination"]
291
291
  listen_timeout = 0.1
@@ -415,9 +415,9 @@ class TestLLMCognitiveDiscovery:
415
415
  async def test_llm_receives_peer_context_in_prompt(self):
416
416
  """Test LLM receives and understands peer context."""
417
417
  from jarviscore import Mesh
418
- from jarviscore.profiles import ListenerAgent
418
+ from jarviscore.profiles import CustomAgent
419
419
 
420
- class SpecialistAgent(ListenerAgent):
420
+ class SpecialistAgent(CustomAgent):
421
421
  role = "data_specialist"
422
422
  capabilities = ["data_processing", "analytics"]
423
423
  description = "Processes and analyzes data"
@@ -464,11 +464,11 @@ class TestLLMCognitiveDiscovery:
464
464
  async def test_llm_decides_to_delegate_based_on_context(self):
465
465
  """Test LLM autonomously decides to delegate based on peer context."""
466
466
  from jarviscore import Mesh
467
- from jarviscore.profiles import ListenerAgent
467
+ from jarviscore.profiles import CustomAgent
468
468
 
469
469
  delegation_occurred = False
470
470
 
471
- class AnalystAgent(ListenerAgent):
471
+ class AnalystAgent(CustomAgent):
472
472
  role = "analyst"
473
473
  capabilities = ["data_analysis", "statistics", "insights"]
474
474
  description = "Expert data analyst"
@@ -482,7 +482,7 @@ class TestLLMCognitiveDiscovery:
482
482
  "insights": ["Positive trend", "Growth accelerating"]
483
483
  }
484
484
 
485
- class CoordinatorAgent(ListenerAgent):
485
+ class CoordinatorAgent(CustomAgent):
486
486
  role = "coordinator"
487
487
  capabilities = ["coordination", "delegation"]
488
488
  listen_timeout = 0.1
@@ -577,12 +577,12 @@ class TestEndToEndCognitiveDiscovery:
577
577
  async def test_full_flow_without_llm(self):
578
578
  """Test complete flow with mock LLM decisions."""
579
579
  from jarviscore import Mesh
580
- from jarviscore.profiles import ListenerAgent
580
+ from jarviscore.profiles import CustomAgent
581
581
 
582
582
  analyst_requests = []
583
583
  scout_requests = []
584
584
 
585
- class AnalystAgent(ListenerAgent):
585
+ class AnalystAgent(CustomAgent):
586
586
  role = "analyst"
587
587
  capabilities = ["analysis"]
588
588
  listen_timeout = 0.1
@@ -591,7 +591,7 @@ class TestEndToEndCognitiveDiscovery:
591
591
  analyst_requests.append(msg.data)
592
592
  return {"analysis_result": "Data analyzed successfully"}
593
593
 
594
- class ScoutAgent(ListenerAgent):
594
+ class ScoutAgent(CustomAgent):
595
595
  role = "scout"
596
596
  capabilities = ["research"]
597
597
  listen_timeout = 0.1
@@ -600,7 +600,7 @@ class TestEndToEndCognitiveDiscovery:
600
600
  scout_requests.append(msg.data)
601
601
  return {"research_result": "Research completed"}
602
602
 
603
- class OrchestratorAgent(ListenerAgent):
603
+ class OrchestratorAgent(CustomAgent):
604
604
  role = "orchestrator"
605
605
  capabilities = ["orchestration"]
606
606
  listen_timeout = 0.1
@@ -3,7 +3,7 @@ Test 16: Unified DX Flow - Autonomous Agents with Mesh as Tool
3
3
 
4
4
  Tests the COMPLETE real-world flow combining all DX improvements:
5
5
  1. FastAPI Integration (JarvisLifespan)
6
- 2. ListenerAgent Profile
6
+ 2. CustomAgent Profile with P2P Handlers
7
7
  3. Cognitive Discovery (get_cognitive_context)
8
8
  4. LLM Autonomous Delegation - Each agent has mesh as a TOOL
9
9
  5. Peer-to-Peer Communication - No coordinator, any agent can talk to any agent
@@ -85,9 +85,9 @@ requires_llm = pytest.mark.skipif(not llm_is_available(), reason="No valid LLM A
85
85
 
86
86
  def create_llm_agent_class():
87
87
  """Create the LLMAgent base class."""
88
- from jarviscore.profiles import ListenerAgent
88
+ from jarviscore.profiles import CustomAgent
89
89
 
90
- class LLMAgent(ListenerAgent):
90
+ class LLMAgent(CustomAgent):
91
91
  """
92
92
  Base for LLM-powered agents that can discover and delegate to peers.
93
93