agentomatic 0.6.0__tar.gz → 0.8.0__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.
- {agentomatic-0.6.0 → agentomatic-0.8.0}/PKG-INFO +108 -16
- {agentomatic-0.6.0 → agentomatic-0.8.0}/README.md +96 -15
- {agentomatic-0.6.0 → agentomatic-0.8.0}/pyproject.toml +29 -2
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/__init__.py +38 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/_version.py +1 -1
- agentomatic-0.8.0/src/agentomatic/agents/__init__.py +93 -0
- agentomatic-0.8.0/src/agentomatic/agents/base.py +737 -0
- agentomatic-0.8.0/src/agentomatic/agents/builder.py +232 -0
- agentomatic-0.8.0/src/agentomatic/agents/decorators.py +109 -0
- agentomatic-0.8.0/src/agentomatic/agents/graph.py +507 -0
- agentomatic-0.8.0/src/agentomatic/agents/metrics.py +202 -0
- agentomatic-0.8.0/src/agentomatic/agents/mixins/__init__.py +31 -0
- agentomatic-0.8.0/src/agentomatic/agents/mixins/dataset.py +74 -0
- agentomatic-0.8.0/src/agentomatic/agents/mixins/evaluation.py +150 -0
- agentomatic-0.8.0/src/agentomatic/agents/mixins/graph_execution.py +181 -0
- agentomatic-0.8.0/src/agentomatic/agents/mixins/observability.py +71 -0
- agentomatic-0.8.0/src/agentomatic/agents/mixins/optimization.py +131 -0
- agentomatic-0.8.0/src/agentomatic/agents/mixins/serialization.py +135 -0
- agentomatic-0.8.0/src/agentomatic/agents/optimizers.py +223 -0
- agentomatic-0.8.0/src/agentomatic/agents/types.py +399 -0
- agentomatic-0.8.0/src/agentomatic/cli/commands.py +1481 -0
- agentomatic-0.8.0/src/agentomatic/cli/templates.py +915 -0
- agentomatic-0.8.0/src/agentomatic/config/__init__.py +19 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/config/settings.py +45 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/core/__init__.py +2 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/core/manifest.py +14 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/core/platform.py +167 -1
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/core/registry.py +159 -2
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/core/router_factory.py +22 -1
- agentomatic-0.8.0/src/agentomatic/core/schemas.py +95 -0
- agentomatic-0.8.0/src/agentomatic/delegation/__init__.py +12 -0
- agentomatic-0.8.0/src/agentomatic/delegation/handoff.py +180 -0
- agentomatic-0.8.0/src/agentomatic/delegation/swarm.py +265 -0
- agentomatic-0.8.0/src/agentomatic/pipelines/__init__.py +82 -0
- agentomatic-0.8.0/src/agentomatic/pipelines/builder.py +572 -0
- agentomatic-0.8.0/src/agentomatic/pipelines/context.py +228 -0
- agentomatic-0.8.0/src/agentomatic/pipelines/engine.py +432 -0
- agentomatic-0.8.0/src/agentomatic/pipelines/flow.py +585 -0
- agentomatic-0.8.0/src/agentomatic/pipelines/loader.py +488 -0
- agentomatic-0.8.0/src/agentomatic/pipelines/models.py +295 -0
- agentomatic-0.8.0/src/agentomatic/pipelines/router.py +198 -0
- agentomatic-0.8.0/src/agentomatic/pipelines/steps.py +484 -0
- agentomatic-0.8.0/src/agentomatic/plugins/__init__.py +7 -0
- agentomatic-0.8.0/src/agentomatic/plugins/ml.py +78 -0
- agentomatic-0.8.0/src/agentomatic/plugins/registry.py +107 -0
- agentomatic-0.8.0/src/agentomatic/plugins/router.py +80 -0
- agentomatic-0.8.0/src/agentomatic/prompts/manager.py +131 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/providers/__init__.py +4 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/providers/llm.py +88 -3
- agentomatic-0.8.0/src/agentomatic/security/__init__.py +14 -0
- agentomatic-0.8.0/src/agentomatic/security/jwt_auth.py +176 -0
- agentomatic-0.8.0/src/agentomatic/security/policy.py +114 -0
- agentomatic-0.8.0/src/agentomatic/security/zero_trust.py +213 -0
- agentomatic-0.8.0/src/agentomatic/stacks/__init__.py +7 -0
- agentomatic-0.8.0/src/agentomatic/stacks/defaults.py +154 -0
- agentomatic-0.8.0/src/agentomatic/stacks/manager.py +431 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/adapters/__init__.py +8 -1
- agentomatic-0.8.0/src/agentomatic/studio/adapters/graph_agent.py +163 -0
- agentomatic-0.8.0/tests/test_agent_dataset.py +296 -0
- agentomatic-0.8.0/tests/test_agent_graph.py +506 -0
- agentomatic-0.8.0/tests/test_agent_graph_stream.py +63 -0
- agentomatic-0.8.0/tests/test_agent_metrics.py +170 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_agentomatic.py +27 -36
- agentomatic-0.8.0/tests/test_base_graph_agent.py +626 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_cli.py +33 -33
- agentomatic-0.8.0/tests/test_delegation.py +381 -0
- agentomatic-0.8.0/tests/test_flow.py +472 -0
- agentomatic-0.8.0/tests/test_pipelines.py +1068 -0
- agentomatic-0.8.0/tests/test_plugins.py +76 -0
- agentomatic-0.8.0/tests/test_security.py +460 -0
- agentomatic-0.8.0/tests/test_stacks.py +380 -0
- agentomatic-0.8.0/tests/test_v06_core.py +538 -0
- agentomatic-0.6.0/src/agentomatic/cli/commands.py +0 -758
- agentomatic-0.6.0/src/agentomatic/cli/templates.py +0 -211
- agentomatic-0.6.0/src/agentomatic/config/__init__.py +0 -3
- agentomatic-0.6.0/src/agentomatic/prompts/manager.py +0 -59
- {agentomatic-0.6.0 → agentomatic-0.8.0}/LICENSE +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/examples/full_agent/README.md +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/cli/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/config/defaults.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/core/lifespan.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/core/memory_manager.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/core/state.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/demo/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/demo/agent.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/demo/server.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/middleware/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/middleware/auth.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/middleware/feedback.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/middleware/logging.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/middleware/metrics.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/middleware/rate_limit.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/observability/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/observability/concurrency.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/observability/metrics.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/observability/telemetry.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/config.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/context.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/dashboard.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/dataset.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/deployment.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/eval_contract.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/events.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/failure_analysis.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/fitter.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/fitter_optimizers.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/judges.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/llm_caller.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/loop.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/metrics.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/optimizer.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/progress.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/report.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/runner.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/search_space.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/strategies.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/optimize/synthesizer.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/prompts/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/protocols/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/protocols/decorators.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/providers/embeddings.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/py.typed +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/storage/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/storage/base.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/storage/checkpointer.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/storage/memory.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/storage/models.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/storage/sqlalchemy.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/adapter.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/adapters/generic.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/adapters/langchain.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/adapters/langgraph.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/decorators.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/graph_inspector.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/models.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/router.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/run_tracker.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/serve.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/asset-manifest.json +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/imgs/graph_view.png +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/imgs/logo.png +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/imgs/main_screen.png +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/imgs/main_screen_ok.png +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/index.html +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/manifest.json +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/static/css/main.8b3c42dd.css +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/static/css/main.8b3c42dd.css.map +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/static/js/main.cbb2a8ee.js +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/static/js/main.cbb2a8ee.js.LICENSE.txt +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/studio/static/static/js/main.cbb2a8ee.js.map +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/ui/__init__.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/src/agentomatic/ui/chat.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_bugfixes_041.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_coverage_boost.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_deep_agent.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_fitter.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_integration.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_optimize.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_optimizer_dashboard.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_optimizer_events.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_optimizer_progress.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_platform_features.py +0 -0
- {agentomatic-0.6.0 → agentomatic-0.8.0}/tests/test_studio.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentomatic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.0
|
|
4
4
|
Summary: Drop agents, not code — zero-code multi-agent API platform framework
|
|
5
5
|
Project-URL: Homepage, https://github.com/UnicoLab/agentomatic
|
|
6
6
|
Project-URL: Documentation, https://unicolab.github.io/agentomatic
|
|
@@ -34,10 +34,12 @@ Requires-Dist: typing-extensions>=4.12
|
|
|
34
34
|
Requires-Dist: uvicorn[standard]>=0.32
|
|
35
35
|
Provides-Extra: all
|
|
36
36
|
Requires-Dist: aiosqlite>=0.20; extra == 'all'
|
|
37
|
+
Requires-Dist: cryptography>=42.0; extra == 'all'
|
|
37
38
|
Requires-Dist: deepeval>=2.0; extra == 'all'
|
|
38
39
|
Requires-Dist: holysheet>=0.1; extra == 'all'
|
|
39
40
|
Requires-Dist: langchain-core>=0.3; extra == 'all'
|
|
40
41
|
Requires-Dist: langchain-ollama>=0.2; extra == 'all'
|
|
42
|
+
Requires-Dist: langgraph-swarm>=0.1; extra == 'all'
|
|
41
43
|
Requires-Dist: langgraph>=0.4; extra == 'all'
|
|
42
44
|
Requires-Dist: ollama>=0.4; extra == 'all'
|
|
43
45
|
Requires-Dist: opentelemetry-api>=1.20; extra == 'all'
|
|
@@ -45,6 +47,8 @@ Requires-Dist: opentelemetry-instrumentation-fastapi>=0.40; extra == 'all'
|
|
|
45
47
|
Requires-Dist: opentelemetry-instrumentation-httpx>=0.40; extra == 'all'
|
|
46
48
|
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'all'
|
|
47
49
|
Requires-Dist: prometheus-client>=0.21; extra == 'all'
|
|
50
|
+
Requires-Dist: pyjwt[crypto]>=2.8; extra == 'all'
|
|
51
|
+
Requires-Dist: python-dotenv>=1.0; extra == 'all'
|
|
48
52
|
Requires-Dist: questionary>=2.0; extra == 'all'
|
|
49
53
|
Requires-Dist: rich>=13.0; extra == 'all'
|
|
50
54
|
Requires-Dist: sqlalchemy[asyncio]>=2.0; extra == 'all'
|
|
@@ -74,6 +78,8 @@ Provides-Extra: docs
|
|
|
74
78
|
Requires-Dist: mike>=2.1; extra == 'docs'
|
|
75
79
|
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
|
|
76
80
|
Requires-Dist: pymdown-extensions>=10.0; extra == 'docs'
|
|
81
|
+
Provides-Extra: dotenv
|
|
82
|
+
Requires-Dist: python-dotenv>=1.0; extra == 'dotenv'
|
|
77
83
|
Provides-Extra: langchain
|
|
78
84
|
Requires-Dist: langchain-community>=0.3; extra == 'langchain'
|
|
79
85
|
Requires-Dist: langchain-core>=0.3; extra == 'langchain'
|
|
@@ -91,7 +97,12 @@ Requires-Dist: langchain-openai>=0.3; extra == 'openai'
|
|
|
91
97
|
Provides-Extra: optimize
|
|
92
98
|
Requires-Dist: deepeval>=2.0; extra == 'optimize'
|
|
93
99
|
Requires-Dist: holysheet>=0.1; extra == 'optimize'
|
|
100
|
+
Provides-Extra: security
|
|
101
|
+
Requires-Dist: cryptography>=42.0; extra == 'security'
|
|
102
|
+
Requires-Dist: pyjwt[crypto]>=2.8; extra == 'security'
|
|
94
103
|
Provides-Extra: studio
|
|
104
|
+
Provides-Extra: swarm
|
|
105
|
+
Requires-Dist: langgraph-swarm>=0.1; extra == 'swarm'
|
|
95
106
|
Provides-Extra: telemetry
|
|
96
107
|
Requires-Dist: opentelemetry-api>=1.20; extra == 'telemetry'
|
|
97
108
|
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.40; extra == 'telemetry'
|
|
@@ -134,11 +145,12 @@ Build, trace, optimize, and time-travel debug production-ready AI agent APIs in
|
|
|
134
145
|
|---|---|
|
|
135
146
|
| 🎯 **Agentomatic Studio** | Embedded visual agent debugger with graph rendering, live SSE node streaming, state mutation, and historical time-travel capabilities. |
|
|
136
147
|
| ⚡ **Prompt Optimizer** | Enterprise-grade prompt and configuration fitting utilizing 5 distinct optimizers with deployment recommendations. |
|
|
137
|
-
| 🔍 **Zero-Code Auto-Discovery** | Drop an agent folder →
|
|
148
|
+
| 🔍 **Zero-Code Auto-Discovery** | Drop an agent folder → 26 fully-documented REST endpoints appear automatically. |
|
|
138
149
|
| 🚀 **Rich API Surface** | Natively handles `invoke`, `stream`, `chat`, `A2A`, `health`, `config`, `threads`, `memory`, and `feedback`. |
|
|
139
150
|
| 🗄️ **Pluggable Storage** | Use `MemoryStore`, `SQLAlchemy`, or plug in your own custom persistence layer. |
|
|
140
151
|
| 🔐 **Enterprise Middleware** | High-performance pipeline with JWT Auth, dynamic rate limiting, and Prometheus telemetry — all toggleable. |
|
|
141
|
-
| 📦 **Scaffolding Templates** | Jumpstart development with
|
|
152
|
+
| 📦 **Scaffolding Templates** | Jumpstart development with 8 templates: `basic`, `full`, `rag`, `chatbot`, `deepagent`, `custom`, `legacy_dict`, `plugin`. |
|
|
153
|
+
| 🧬 **Class-Based Agents** | Define agents as Python classes with ML lifecycle: `compile()` → `fit()` → `evaluate()` → `transform()`. |
|
|
142
154
|
| 🤖 **A2A Protocol** | True Agent-to-Agent communication flows integrated out of the box. |
|
|
143
155
|
| 🔌 **Framework Agnostic** | Fully supports LangGraph, LangChain, or raw Python execution logic. |
|
|
144
156
|
| 🩺 **Beautiful CLI** | A rich terminal experience with commands like `doctor`, `inspect`, and `test`. |
|
|
@@ -216,13 +228,12 @@ curl -X POST http://localhost:8000/api/v1/my_agent/invoke \
|
|
|
216
228
|
|
|
217
229
|
## 📂 Agent Structure
|
|
218
230
|
|
|
219
|
-
Only `
|
|
231
|
+
Only `agent.py` is required. Everything else is optional overrides:
|
|
220
232
|
|
|
221
233
|
```
|
|
222
234
|
agents/my_agent/
|
|
223
|
-
├── __init__.py ←
|
|
224
|
-
├──
|
|
225
|
-
├── nodes.py ← Optional: node functions
|
|
235
|
+
├── __init__.py ← Optional: Python package init
|
|
236
|
+
├── agent.py ← REQUIRED: Contains your BaseGraphAgent subclass
|
|
226
237
|
├── config.py ← Optional: Pydantic config
|
|
227
238
|
├── schemas.py ← Optional: custom request/response models
|
|
228
239
|
├── tools.py ← Optional: LangChain tools
|
|
@@ -239,13 +250,16 @@ agents/my_agent/
|
|
|
239
250
|
agentomatic init my_agent --template <template>
|
|
240
251
|
```
|
|
241
252
|
|
|
242
|
-
| Template |
|
|
243
|
-
|
|
244
|
-
| `basic` |
|
|
245
|
-
| `full` |
|
|
246
|
-
| `rag` |
|
|
247
|
-
| `chatbot` |
|
|
248
|
-
| `
|
|
253
|
+
| Template | Description |
|
|
254
|
+
|----------|-------------|
|
|
255
|
+
| `basic` | Minimal class-based agent (recommended) — quick start |
|
|
256
|
+
| `full` | All override files — class agent with config, schemas, api, tools, prompts |
|
|
257
|
+
| `rag` | RAG class-based agent — retrieve → generate pipeline |
|
|
258
|
+
| `chatbot` | Conversational class-based agent with memory |
|
|
259
|
+
| `deepagent` | Deep Agent — planning, tools, subagents (requires deepagents package) |
|
|
260
|
+
| `custom` | Framework-agnostic — no LangGraph dependency |
|
|
261
|
+
| `legacy_dict` | Legacy functional agent — 3 files (`__init__`, graph, nodes) |
|
|
262
|
+
| `plugin` | ML Model Plugin — wrap classical ML models with REST endpoints |
|
|
249
263
|
|
|
250
264
|
## 🖥️ CLI
|
|
251
265
|
|
|
@@ -263,11 +277,59 @@ agentomatic init my_agent --template <template>
|
|
|
263
277
|
doctor Environment health check
|
|
264
278
|
optimize <name> Run prompt optimization
|
|
265
279
|
ui Launch Chainlit debug UI standalone
|
|
280
|
+
pipeline Pipeline management commands
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## 🧬 Class-Based Agents (NEW)
|
|
284
|
+
|
|
285
|
+
Define agents as Python classes with built-in graph wiring and ML lifecycle:
|
|
286
|
+
|
|
287
|
+
```python
|
|
288
|
+
from dataclasses import dataclass, field
|
|
289
|
+
from agentomatic import BaseGraphAgent
|
|
290
|
+
|
|
291
|
+
@dataclass
|
|
292
|
+
class MyState:
|
|
293
|
+
query: str = ""
|
|
294
|
+
output: dict = field(default_factory=dict)
|
|
295
|
+
|
|
296
|
+
class MyAgent(BaseGraphAgent[MyState]):
|
|
297
|
+
agent_name = "my_agent"
|
|
298
|
+
|
|
299
|
+
def build_graph(self):
|
|
300
|
+
g = self.new_graph()
|
|
301
|
+
g.add_node("process", self.process)
|
|
302
|
+
g.add_node("format", self.format_out)
|
|
303
|
+
g.set_entry_point("process")
|
|
304
|
+
g.add_edge("process", "format")
|
|
305
|
+
g.set_finish_point("format")
|
|
306
|
+
return g.compile()
|
|
307
|
+
|
|
308
|
+
def process(self, state):
|
|
309
|
+
state.output = {"response": f"Hello! You asked: {state.query}"}
|
|
310
|
+
return state
|
|
311
|
+
|
|
312
|
+
def format_out(self, state):
|
|
313
|
+
return state
|
|
314
|
+
|
|
315
|
+
def input_to_state(self, data):
|
|
316
|
+
return MyState(query=data.get("query", ""))
|
|
317
|
+
|
|
318
|
+
def state_to_output(self, state):
|
|
319
|
+
return state.output
|
|
320
|
+
|
|
321
|
+
# ML-like workflow
|
|
322
|
+
agent = MyAgent()
|
|
323
|
+
result = agent.transform({"query": "Hello!"})
|
|
324
|
+
agent.compile(dataset, metrics)
|
|
325
|
+
agent.fit(dataset)
|
|
326
|
+
report = agent.evaluate(dataset.test, metrics)
|
|
327
|
+
agent.save("compiled/v1")
|
|
266
328
|
```
|
|
267
329
|
|
|
268
330
|
## 🎨 Agentomatic Studio
|
|
269
331
|
|
|
270
|
-
Agentomatic ships with a built-in React-based visual studio designed for time-travel debugging, real-time node streaming, and state inspection
|
|
332
|
+
Agentomatic ships with a built-in React-based visual studio designed for time-travel debugging, real-time node streaming, and state inspection. Works with class-based agents, LangGraph, LangChain, and any custom framework via the adapter system.
|
|
271
333
|
|
|
272
334
|
To use the studio, install the optional package dependencies and run with the `--studio` flag:
|
|
273
335
|
|
|
@@ -276,7 +338,7 @@ pip install "agentomatic[studio]"
|
|
|
276
338
|
agentomatic run --studio
|
|
277
339
|
```
|
|
278
340
|
|
|
279
|
-
The unified server will bind to `http://localhost:8000` and mount the studio at `http://localhost:8000/studio/ui/`.
|
|
341
|
+
The unified server will bind to `http://localhost:8000` and mount the studio at `http://localhost:8000/studio/ui/`.
|
|
280
342
|
|
|
281
343
|
**Key Studio Features**:
|
|
282
344
|
- **Live Node Streaming**: Watch Server-Sent Events (SSE) transition node activity dynamically.
|
|
@@ -284,6 +346,36 @@ The unified server will bind to `http://localhost:8000` and mount the studio at
|
|
|
284
346
|
- **Time-Travel History**: Rewind to any state checkpoint and replay from historical forks.
|
|
285
347
|
- **Live State Editing**: Mutate graph state payloads on the fly during a breakpoint pause.
|
|
286
348
|
|
|
349
|
+
## 🧠 ML Model Plugins (NEW)
|
|
350
|
+
|
|
351
|
+
Agentomatic isn't just for LLMs. Wrap classical ML models (Scikit-Learn, PyTorch, PyMC) securely with auto-generated REST endpoints:
|
|
352
|
+
|
|
353
|
+
```python
|
|
354
|
+
from agentomatic.plugins import BaseMLPlugin
|
|
355
|
+
from pydantic import BaseModel
|
|
356
|
+
|
|
357
|
+
class IrisInput(BaseModel):
|
|
358
|
+
sepal_length: float
|
|
359
|
+
sepal_width: float
|
|
360
|
+
petal_length: float
|
|
361
|
+
petal_width: float
|
|
362
|
+
|
|
363
|
+
class IrisPlugin(BaseMLPlugin[IrisInput, dict]):
|
|
364
|
+
async def load_model(self):
|
|
365
|
+
# Load sklearn model from disk
|
|
366
|
+
import joblib
|
|
367
|
+
self.model = joblib.load("iris_model.pkl")
|
|
368
|
+
|
|
369
|
+
async def predict(self, inputs: IrisInput) -> dict:
|
|
370
|
+
prediction = self.model.predict([[
|
|
371
|
+
inputs.sepal_length, inputs.sepal_width,
|
|
372
|
+
inputs.petal_length, inputs.petal_width
|
|
373
|
+
]])
|
|
374
|
+
return {"species": prediction[0]}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Place it in `plugins/` and Agentomatic auto-discovers it alongside your AI agents!
|
|
378
|
+
|
|
287
379
|
## ⚙️ Configuration
|
|
288
380
|
|
|
289
381
|
```python
|
|
@@ -29,11 +29,12 @@ Build, trace, optimize, and time-travel debug production-ready AI agent APIs in
|
|
|
29
29
|
|---|---|
|
|
30
30
|
| 🎯 **Agentomatic Studio** | Embedded visual agent debugger with graph rendering, live SSE node streaming, state mutation, and historical time-travel capabilities. |
|
|
31
31
|
| ⚡ **Prompt Optimizer** | Enterprise-grade prompt and configuration fitting utilizing 5 distinct optimizers with deployment recommendations. |
|
|
32
|
-
| 🔍 **Zero-Code Auto-Discovery** | Drop an agent folder →
|
|
32
|
+
| 🔍 **Zero-Code Auto-Discovery** | Drop an agent folder → 26 fully-documented REST endpoints appear automatically. |
|
|
33
33
|
| 🚀 **Rich API Surface** | Natively handles `invoke`, `stream`, `chat`, `A2A`, `health`, `config`, `threads`, `memory`, and `feedback`. |
|
|
34
34
|
| 🗄️ **Pluggable Storage** | Use `MemoryStore`, `SQLAlchemy`, or plug in your own custom persistence layer. |
|
|
35
35
|
| 🔐 **Enterprise Middleware** | High-performance pipeline with JWT Auth, dynamic rate limiting, and Prometheus telemetry — all toggleable. |
|
|
36
|
-
| 📦 **Scaffolding Templates** | Jumpstart development with
|
|
36
|
+
| 📦 **Scaffolding Templates** | Jumpstart development with 8 templates: `basic`, `full`, `rag`, `chatbot`, `deepagent`, `custom`, `legacy_dict`, `plugin`. |
|
|
37
|
+
| 🧬 **Class-Based Agents** | Define agents as Python classes with ML lifecycle: `compile()` → `fit()` → `evaluate()` → `transform()`. |
|
|
37
38
|
| 🤖 **A2A Protocol** | True Agent-to-Agent communication flows integrated out of the box. |
|
|
38
39
|
| 🔌 **Framework Agnostic** | Fully supports LangGraph, LangChain, or raw Python execution logic. |
|
|
39
40
|
| 🩺 **Beautiful CLI** | A rich terminal experience with commands like `doctor`, `inspect`, and `test`. |
|
|
@@ -111,13 +112,12 @@ curl -X POST http://localhost:8000/api/v1/my_agent/invoke \
|
|
|
111
112
|
|
|
112
113
|
## 📂 Agent Structure
|
|
113
114
|
|
|
114
|
-
Only `
|
|
115
|
+
Only `agent.py` is required. Everything else is optional overrides:
|
|
115
116
|
|
|
116
117
|
```
|
|
117
118
|
agents/my_agent/
|
|
118
|
-
├── __init__.py ←
|
|
119
|
-
├──
|
|
120
|
-
├── nodes.py ← Optional: node functions
|
|
119
|
+
├── __init__.py ← Optional: Python package init
|
|
120
|
+
├── agent.py ← REQUIRED: Contains your BaseGraphAgent subclass
|
|
121
121
|
├── config.py ← Optional: Pydantic config
|
|
122
122
|
├── schemas.py ← Optional: custom request/response models
|
|
123
123
|
├── tools.py ← Optional: LangChain tools
|
|
@@ -134,13 +134,16 @@ agents/my_agent/
|
|
|
134
134
|
agentomatic init my_agent --template <template>
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
| Template |
|
|
138
|
-
|
|
139
|
-
| `basic` |
|
|
140
|
-
| `full` |
|
|
141
|
-
| `rag` |
|
|
142
|
-
| `chatbot` |
|
|
143
|
-
| `
|
|
137
|
+
| Template | Description |
|
|
138
|
+
|----------|-------------|
|
|
139
|
+
| `basic` | Minimal class-based agent (recommended) — quick start |
|
|
140
|
+
| `full` | All override files — class agent with config, schemas, api, tools, prompts |
|
|
141
|
+
| `rag` | RAG class-based agent — retrieve → generate pipeline |
|
|
142
|
+
| `chatbot` | Conversational class-based agent with memory |
|
|
143
|
+
| `deepagent` | Deep Agent — planning, tools, subagents (requires deepagents package) |
|
|
144
|
+
| `custom` | Framework-agnostic — no LangGraph dependency |
|
|
145
|
+
| `legacy_dict` | Legacy functional agent — 3 files (`__init__`, graph, nodes) |
|
|
146
|
+
| `plugin` | ML Model Plugin — wrap classical ML models with REST endpoints |
|
|
144
147
|
|
|
145
148
|
## 🖥️ CLI
|
|
146
149
|
|
|
@@ -158,11 +161,59 @@ agentomatic init my_agent --template <template>
|
|
|
158
161
|
doctor Environment health check
|
|
159
162
|
optimize <name> Run prompt optimization
|
|
160
163
|
ui Launch Chainlit debug UI standalone
|
|
164
|
+
pipeline Pipeline management commands
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## 🧬 Class-Based Agents (NEW)
|
|
168
|
+
|
|
169
|
+
Define agents as Python classes with built-in graph wiring and ML lifecycle:
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
from dataclasses import dataclass, field
|
|
173
|
+
from agentomatic import BaseGraphAgent
|
|
174
|
+
|
|
175
|
+
@dataclass
|
|
176
|
+
class MyState:
|
|
177
|
+
query: str = ""
|
|
178
|
+
output: dict = field(default_factory=dict)
|
|
179
|
+
|
|
180
|
+
class MyAgent(BaseGraphAgent[MyState]):
|
|
181
|
+
agent_name = "my_agent"
|
|
182
|
+
|
|
183
|
+
def build_graph(self):
|
|
184
|
+
g = self.new_graph()
|
|
185
|
+
g.add_node("process", self.process)
|
|
186
|
+
g.add_node("format", self.format_out)
|
|
187
|
+
g.set_entry_point("process")
|
|
188
|
+
g.add_edge("process", "format")
|
|
189
|
+
g.set_finish_point("format")
|
|
190
|
+
return g.compile()
|
|
191
|
+
|
|
192
|
+
def process(self, state):
|
|
193
|
+
state.output = {"response": f"Hello! You asked: {state.query}"}
|
|
194
|
+
return state
|
|
195
|
+
|
|
196
|
+
def format_out(self, state):
|
|
197
|
+
return state
|
|
198
|
+
|
|
199
|
+
def input_to_state(self, data):
|
|
200
|
+
return MyState(query=data.get("query", ""))
|
|
201
|
+
|
|
202
|
+
def state_to_output(self, state):
|
|
203
|
+
return state.output
|
|
204
|
+
|
|
205
|
+
# ML-like workflow
|
|
206
|
+
agent = MyAgent()
|
|
207
|
+
result = agent.transform({"query": "Hello!"})
|
|
208
|
+
agent.compile(dataset, metrics)
|
|
209
|
+
agent.fit(dataset)
|
|
210
|
+
report = agent.evaluate(dataset.test, metrics)
|
|
211
|
+
agent.save("compiled/v1")
|
|
161
212
|
```
|
|
162
213
|
|
|
163
214
|
## 🎨 Agentomatic Studio
|
|
164
215
|
|
|
165
|
-
Agentomatic ships with a built-in React-based visual studio designed for time-travel debugging, real-time node streaming, and state inspection
|
|
216
|
+
Agentomatic ships with a built-in React-based visual studio designed for time-travel debugging, real-time node streaming, and state inspection. Works with class-based agents, LangGraph, LangChain, and any custom framework via the adapter system.
|
|
166
217
|
|
|
167
218
|
To use the studio, install the optional package dependencies and run with the `--studio` flag:
|
|
168
219
|
|
|
@@ -171,7 +222,7 @@ pip install "agentomatic[studio]"
|
|
|
171
222
|
agentomatic run --studio
|
|
172
223
|
```
|
|
173
224
|
|
|
174
|
-
The unified server will bind to `http://localhost:8000` and mount the studio at `http://localhost:8000/studio/ui/`.
|
|
225
|
+
The unified server will bind to `http://localhost:8000` and mount the studio at `http://localhost:8000/studio/ui/`.
|
|
175
226
|
|
|
176
227
|
**Key Studio Features**:
|
|
177
228
|
- **Live Node Streaming**: Watch Server-Sent Events (SSE) transition node activity dynamically.
|
|
@@ -179,6 +230,36 @@ The unified server will bind to `http://localhost:8000` and mount the studio at
|
|
|
179
230
|
- **Time-Travel History**: Rewind to any state checkpoint and replay from historical forks.
|
|
180
231
|
- **Live State Editing**: Mutate graph state payloads on the fly during a breakpoint pause.
|
|
181
232
|
|
|
233
|
+
## 🧠 ML Model Plugins (NEW)
|
|
234
|
+
|
|
235
|
+
Agentomatic isn't just for LLMs. Wrap classical ML models (Scikit-Learn, PyTorch, PyMC) securely with auto-generated REST endpoints:
|
|
236
|
+
|
|
237
|
+
```python
|
|
238
|
+
from agentomatic.plugins import BaseMLPlugin
|
|
239
|
+
from pydantic import BaseModel
|
|
240
|
+
|
|
241
|
+
class IrisInput(BaseModel):
|
|
242
|
+
sepal_length: float
|
|
243
|
+
sepal_width: float
|
|
244
|
+
petal_length: float
|
|
245
|
+
petal_width: float
|
|
246
|
+
|
|
247
|
+
class IrisPlugin(BaseMLPlugin[IrisInput, dict]):
|
|
248
|
+
async def load_model(self):
|
|
249
|
+
# Load sklearn model from disk
|
|
250
|
+
import joblib
|
|
251
|
+
self.model = joblib.load("iris_model.pkl")
|
|
252
|
+
|
|
253
|
+
async def predict(self, inputs: IrisInput) -> dict:
|
|
254
|
+
prediction = self.model.predict([[
|
|
255
|
+
inputs.sepal_length, inputs.sepal_width,
|
|
256
|
+
inputs.petal_length, inputs.petal_width
|
|
257
|
+
]])
|
|
258
|
+
return {"species": prediction[0]}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Place it in `plugins/` and Agentomatic auto-discovers it alongside your AI agents!
|
|
262
|
+
|
|
182
263
|
## ⚙️ Configuration
|
|
183
264
|
|
|
184
265
|
```python
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "agentomatic"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.0"
|
|
4
4
|
description = "Drop agents, not code — zero-code multi-agent API platform framework"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = {text = "MIT"}
|
|
@@ -52,7 +52,10 @@ telemetry = [
|
|
|
52
52
|
"opentelemetry-instrumentation-fastapi>=0.40",
|
|
53
53
|
"opentelemetry-instrumentation-httpx>=0.40",
|
|
54
54
|
]
|
|
55
|
-
|
|
55
|
+
dotenv = ["python-dotenv>=1.0"]
|
|
56
|
+
security = ["pyjwt[crypto]>=2.8", "cryptography>=42.0"]
|
|
57
|
+
swarm = ["langgraph-swarm>=0.1"]
|
|
58
|
+
all = ["agentomatic[langgraph,ollama,metrics,db,cli,studio,optimize,telemetry,dotenv,security,swarm]"]
|
|
56
59
|
docs = [
|
|
57
60
|
"mkdocs-material>=9.5",
|
|
58
61
|
"mike>=2.1",
|
|
@@ -86,6 +89,8 @@ Changelog = "https://github.com/UnicoLab/agentomatic/blob/main/CHANGELOG.md"
|
|
|
86
89
|
|
|
87
90
|
|
|
88
91
|
|
|
92
|
+
|
|
93
|
+
|
|
89
94
|
[dependency-groups]
|
|
90
95
|
dev = [
|
|
91
96
|
"pytest>=8",
|
|
@@ -98,6 +103,8 @@ dev = [
|
|
|
98
103
|
"build>=1.0",
|
|
99
104
|
"twine>=6.0",
|
|
100
105
|
"python-semantic-release>=9.0",
|
|
106
|
+
"mike>=2.2.0",
|
|
107
|
+
"mkdocs-material>=9.7.6",
|
|
101
108
|
]
|
|
102
109
|
docs = [
|
|
103
110
|
"mkdocs-material>=9.5",
|
|
@@ -190,12 +197,18 @@ exclude_lines = [
|
|
|
190
197
|
# ---------------------------------------------------------------------------
|
|
191
198
|
[tool.mypy]
|
|
192
199
|
python_version = "3.11"
|
|
200
|
+
plugins = ["pydantic.mypy"]
|
|
193
201
|
warn_return_any = false
|
|
194
202
|
warn_unused_configs = true
|
|
195
203
|
check_untyped_defs = true
|
|
196
204
|
explicit_package_bases = true
|
|
197
205
|
mypy_path = "src"
|
|
198
206
|
|
|
207
|
+
[tool.pydantic-mypy]
|
|
208
|
+
init_forbid_extra = true
|
|
209
|
+
init_typed = true
|
|
210
|
+
warn_required_dynamic_aliases = true
|
|
211
|
+
|
|
199
212
|
# Pydantic models with Field(default=...) trigger false call-arg errors
|
|
200
213
|
[[tool.mypy.overrides]]
|
|
201
214
|
module = [
|
|
@@ -205,6 +218,20 @@ module = [
|
|
|
205
218
|
"agentomatic.studio.run_tracker",
|
|
206
219
|
"agentomatic.demo.*",
|
|
207
220
|
"agentomatic.optimize.*",
|
|
221
|
+
"agentomatic.providers.*",
|
|
208
222
|
]
|
|
209
223
|
disable_error_code = ["call-arg", "override", "misc", "attr-defined"]
|
|
210
224
|
|
|
225
|
+
# Optional dependencies that may not be installed
|
|
226
|
+
[[tool.mypy.overrides]]
|
|
227
|
+
module = [
|
|
228
|
+
"chainlit",
|
|
229
|
+
"chainlit.*",
|
|
230
|
+
"litellm",
|
|
231
|
+
"opentelemetry.*",
|
|
232
|
+
"langchain_openai",
|
|
233
|
+
"langchain_google_vertexai",
|
|
234
|
+
"holysheet",
|
|
235
|
+
"yaml",
|
|
236
|
+
]
|
|
237
|
+
ignore_missing_imports = true
|
|
@@ -24,6 +24,13 @@ With storage::
|
|
|
24
24
|
enable_auth=True,
|
|
25
25
|
auth_api_key="secret",
|
|
26
26
|
)
|
|
27
|
+
|
|
28
|
+
With stacks (v0.6)::
|
|
29
|
+
|
|
30
|
+
from agentomatic import AgentPlatform
|
|
31
|
+
|
|
32
|
+
platform = AgentPlatform.from_folder("agents/", stack="local")
|
|
33
|
+
app = platform.build()
|
|
27
34
|
"""
|
|
28
35
|
|
|
29
36
|
from __future__ import annotations
|
|
@@ -36,6 +43,7 @@ from agentomatic.core.manifest import AgentManifest, RegisteredAgent
|
|
|
36
43
|
from agentomatic.core.memory_manager import ConversationMemoryManager
|
|
37
44
|
from agentomatic.core.platform import AgentPlatform
|
|
38
45
|
from agentomatic.core.registry import AgentRegistry
|
|
46
|
+
from agentomatic.core.schemas import SchemaValidator
|
|
39
47
|
from agentomatic.core.state import BaseAgentState
|
|
40
48
|
from agentomatic.prompts import PromptManager
|
|
41
49
|
|
|
@@ -45,6 +53,24 @@ from agentomatic.protocols.decorators import APIResponse, handle_api_errors, log
|
|
|
45
53
|
# Studio
|
|
46
54
|
from agentomatic.studio import GraphInspector, RunTracker
|
|
47
55
|
|
|
56
|
+
# Pipelines (lazy — avoids hard failure if yaml not installed)
|
|
57
|
+
try:
|
|
58
|
+
from agentomatic.pipelines import Pipeline, PipelineConfig, PipelineResult
|
|
59
|
+
except ImportError:
|
|
60
|
+
Pipeline = None # type: ignore[assignment,misc]
|
|
61
|
+
PipelineConfig = None # type: ignore[assignment,misc]
|
|
62
|
+
PipelineResult = None # type: ignore[assignment,misc]
|
|
63
|
+
|
|
64
|
+
# Class-owned graph agents (v0.7)
|
|
65
|
+
from agentomatic.agents import (
|
|
66
|
+
AgentDataset,
|
|
67
|
+
AgentExample,
|
|
68
|
+
AgentGraph,
|
|
69
|
+
BaseGraphAgent,
|
|
70
|
+
GraphBuilder,
|
|
71
|
+
agent_node,
|
|
72
|
+
)
|
|
73
|
+
|
|
48
74
|
__all__ = [
|
|
49
75
|
# Core
|
|
50
76
|
"AgentPlatform",
|
|
@@ -53,6 +79,7 @@ __all__ = [
|
|
|
53
79
|
"AgentRegistry",
|
|
54
80
|
"BaseAgentState",
|
|
55
81
|
"ConversationMemoryManager",
|
|
82
|
+
"SchemaValidator",
|
|
56
83
|
# Protocols
|
|
57
84
|
"APIResponse",
|
|
58
85
|
"handle_api_errors",
|
|
@@ -62,6 +89,17 @@ __all__ = [
|
|
|
62
89
|
# Studio
|
|
63
90
|
"GraphInspector",
|
|
64
91
|
"RunTracker",
|
|
92
|
+
# Pipelines
|
|
93
|
+
"Pipeline",
|
|
94
|
+
"PipelineConfig",
|
|
95
|
+
"PipelineResult",
|
|
96
|
+
# Class-owned graph agents (v0.7)
|
|
97
|
+
"BaseGraphAgent",
|
|
98
|
+
"AgentGraph",
|
|
99
|
+
"GraphBuilder",
|
|
100
|
+
"agent_node",
|
|
101
|
+
"AgentDataset",
|
|
102
|
+
"AgentExample",
|
|
65
103
|
# Version
|
|
66
104
|
"__version__",
|
|
67
105
|
]
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"""Class-owned graph agents — ML-like lifecycle for GenAI agents.
|
|
2
|
+
|
|
3
|
+
Define agents as Python classes with LangGraph-style graph wiring::
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
from agentomatic.agents import BaseGraphAgent
|
|
7
|
+
|
|
8
|
+
@dataclass
|
|
9
|
+
class MyState:
|
|
10
|
+
query: str = ""
|
|
11
|
+
response: str = ""
|
|
12
|
+
|
|
13
|
+
class MyAgent(BaseGraphAgent[MyState]):
|
|
14
|
+
agent_name = "my_agent"
|
|
15
|
+
|
|
16
|
+
def __init__(self, *, llm=None):
|
|
17
|
+
super().__init__()
|
|
18
|
+
self.llm = llm
|
|
19
|
+
|
|
20
|
+
def build_graph(self):
|
|
21
|
+
g = self.new_graph()
|
|
22
|
+
g.add_node("process", self.process)
|
|
23
|
+
g.set_entry_point("process")
|
|
24
|
+
g.set_finish_point("process")
|
|
25
|
+
return g.compile()
|
|
26
|
+
|
|
27
|
+
def process(self, state):
|
|
28
|
+
state.response = "hello"
|
|
29
|
+
return state
|
|
30
|
+
|
|
31
|
+
def input_to_state(self, data):
|
|
32
|
+
return MyState(query=data.get("query", ""))
|
|
33
|
+
|
|
34
|
+
def state_to_output(self, state):
|
|
35
|
+
return {"response": state.response}
|
|
36
|
+
|
|
37
|
+
# ML-like workflow
|
|
38
|
+
agent = MyAgent(llm=my_llm)
|
|
39
|
+
result = agent.transform({"query": "hello"})
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
from __future__ import annotations
|
|
43
|
+
|
|
44
|
+
from agentomatic.agents.base import BaseGraphAgent
|
|
45
|
+
from agentomatic.agents.builder import GraphBuilder
|
|
46
|
+
from agentomatic.agents.decorators import agent_node
|
|
47
|
+
from agentomatic.agents.graph import AgentGraph, GraphNode
|
|
48
|
+
from agentomatic.agents.metrics import (
|
|
49
|
+
CallableMetric,
|
|
50
|
+
ContainsTermsMetric,
|
|
51
|
+
ExactKeyMatchMetric,
|
|
52
|
+
OptimizeMetricAdapter,
|
|
53
|
+
)
|
|
54
|
+
from agentomatic.agents.optimizers import (
|
|
55
|
+
GridSearchOptimizer,
|
|
56
|
+
NoOpOptimizer,
|
|
57
|
+
PromptFitterBridge,
|
|
58
|
+
)
|
|
59
|
+
from agentomatic.agents.types import (
|
|
60
|
+
AgentDataset,
|
|
61
|
+
AgentExample,
|
|
62
|
+
EvaluationReport,
|
|
63
|
+
ExampleResult,
|
|
64
|
+
Metric,
|
|
65
|
+
Optimizer,
|
|
66
|
+
TraceEvent,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
__all__ = [
|
|
70
|
+
# Core
|
|
71
|
+
"BaseGraphAgent",
|
|
72
|
+
"AgentGraph",
|
|
73
|
+
"GraphNode",
|
|
74
|
+
"GraphBuilder",
|
|
75
|
+
"agent_node",
|
|
76
|
+
# Types
|
|
77
|
+
"AgentDataset",
|
|
78
|
+
"AgentExample",
|
|
79
|
+
"EvaluationReport",
|
|
80
|
+
"ExampleResult",
|
|
81
|
+
"Metric",
|
|
82
|
+
"Optimizer",
|
|
83
|
+
"TraceEvent",
|
|
84
|
+
# Metrics
|
|
85
|
+
"ExactKeyMatchMetric",
|
|
86
|
+
"ContainsTermsMetric",
|
|
87
|
+
"CallableMetric",
|
|
88
|
+
"OptimizeMetricAdapter",
|
|
89
|
+
# Optimizers
|
|
90
|
+
"NoOpOptimizer",
|
|
91
|
+
"GridSearchOptimizer",
|
|
92
|
+
"PromptFitterBridge",
|
|
93
|
+
]
|