agentdeploy 0.1.1__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.
- agentdeploy-0.1.1/.gitignore +60 -0
- agentdeploy-0.1.1/CHANGELOG.md +47 -0
- agentdeploy-0.1.1/LICENSE +21 -0
- agentdeploy-0.1.1/PKG-INFO +337 -0
- agentdeploy-0.1.1/README.md +266 -0
- agentdeploy-0.1.1/examples/langgraph_example/main.py +104 -0
- agentdeploy-0.1.1/pyproject.toml +160 -0
- agentdeploy-0.1.1/src/agentdeploy/__init__.py +32 -0
- agentdeploy-0.1.1/src/agentdeploy/adapters/__init__.py +6 -0
- agentdeploy-0.1.1/src/agentdeploy/adapters/base.py +46 -0
- agentdeploy-0.1.1/src/agentdeploy/adapters/registry.py +221 -0
- agentdeploy-0.1.1/src/agentdeploy/cli/__init__.py +5 -0
- agentdeploy-0.1.1/src/agentdeploy/cli/main.py +266 -0
- agentdeploy-0.1.1/src/agentdeploy/core/__init__.py +1 -0
- agentdeploy-0.1.1/src/agentdeploy/core/app.py +104 -0
- agentdeploy-0.1.1/src/agentdeploy/core/deploy.py +96 -0
- agentdeploy-0.1.1/src/agentdeploy/core/hitl.py +203 -0
- agentdeploy-0.1.1/src/agentdeploy/core/observability.py +160 -0
- agentdeploy-0.1.1/src/agentdeploy/targets/__init__.py +17 -0
- agentdeploy-0.1.1/src/agentdeploy/targets/cloud_run.py +128 -0
- agentdeploy-0.1.1/src/agentdeploy/targets/docker_compose.py +145 -0
- agentdeploy-0.1.1/src/agentdeploy/targets/kubernetes.py +344 -0
- agentdeploy-0.1.1/src/agentdeploy/targets/lambda_target.py +160 -0
- agentdeploy-0.1.1/tests/__init__.py +0 -0
- agentdeploy-0.1.1/tests/test_core.py +354 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# --- Python ---
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
|
|
8
|
+
# Distribution / packaging
|
|
9
|
+
.eggs/
|
|
10
|
+
*.egg-info/
|
|
11
|
+
*.egg
|
|
12
|
+
build/
|
|
13
|
+
dist/
|
|
14
|
+
sdist/
|
|
15
|
+
wheels/
|
|
16
|
+
pip-wheel-metadata/
|
|
17
|
+
share/python-wheels/
|
|
18
|
+
MANIFEST
|
|
19
|
+
|
|
20
|
+
# Virtual environments
|
|
21
|
+
.venv/
|
|
22
|
+
venv/
|
|
23
|
+
env/
|
|
24
|
+
ENV/
|
|
25
|
+
.python-version
|
|
26
|
+
|
|
27
|
+
# uv
|
|
28
|
+
.uv/
|
|
29
|
+
uv.lock
|
|
30
|
+
|
|
31
|
+
# --- Tooling ---
|
|
32
|
+
.pytest_cache/
|
|
33
|
+
.coverage
|
|
34
|
+
.coverage.*
|
|
35
|
+
htmlcov/
|
|
36
|
+
.tox/
|
|
37
|
+
.nox/
|
|
38
|
+
.cache/
|
|
39
|
+
.mypy_cache/
|
|
40
|
+
.ruff_cache/
|
|
41
|
+
.dmypy.json
|
|
42
|
+
dmypy.json
|
|
43
|
+
|
|
44
|
+
# --- Editors / OS ---
|
|
45
|
+
.idea/
|
|
46
|
+
.vscode/
|
|
47
|
+
*.swp
|
|
48
|
+
*.swo
|
|
49
|
+
.DS_Store
|
|
50
|
+
Thumbs.db
|
|
51
|
+
|
|
52
|
+
# --- AgentDeploy generated artifacts ---
|
|
53
|
+
deploy/
|
|
54
|
+
*.local.yaml
|
|
55
|
+
|
|
56
|
+
# --- Secrets ---
|
|
57
|
+
.env
|
|
58
|
+
.env.*
|
|
59
|
+
!.env.example
|
|
60
|
+
*.pem
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.1] - 2026-07-28
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Generated Kubernetes and Docker Compose images no longer install `curl`
|
|
14
|
+
for healthchecks. The healthcheck now uses stdlib `urllib`, which keeps
|
|
15
|
+
the image slim and removes the apt-get layer.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- `LambdaTarget.build()` now raises `ValueError` immediately when no
|
|
19
|
+
`role_arn` is supplied instead of writing a placeholder ARN that fails
|
|
20
|
+
silently on first deploy. The ARN is also validated to start with
|
|
21
|
+
`arn:aws:iam::`.
|
|
22
|
+
- `_OpenAIAgentAdapter` validation and detection no longer match unrelated
|
|
23
|
+
modules whose path contains the substrings "openai" or "agents"
|
|
24
|
+
(e.g. `langchain.agents`, `llama_index.agent`). Detection requires the
|
|
25
|
+
module root to be `agents`, `openai.agents`, or `openai_agents`, and the
|
|
26
|
+
class name to be `Agent`.
|
|
27
|
+
|
|
28
|
+
## [0.1.0] - 2026-04-28
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- Initial release.
|
|
32
|
+
- `AgentApp` fluent builder with auto-detected framework adapters
|
|
33
|
+
(LangGraph, CrewAI, OpenAI Agents SDK, any async callable).
|
|
34
|
+
- `deploy()` pipeline with four targets: Kubernetes, Docker Compose,
|
|
35
|
+
AWS Lambda, Google Cloud Run.
|
|
36
|
+
- `HITLGate` human-in-the-loop checkpoint primitive with webhook,
|
|
37
|
+
Slack, and console delivery channels.
|
|
38
|
+
- `Telemetry` OpenTelemetry tracing with built-in cost estimation
|
|
39
|
+
for `gpt-4o`, `gpt-4o-mini`, `claude-sonnet-4-6`, `claude-opus-4-6`,
|
|
40
|
+
`gemini-1.5-pro`.
|
|
41
|
+
- CLI: `agentdeploy init | validate | build | version`.
|
|
42
|
+
- Test suite covering core wrappers, Kubernetes target, Docker Compose
|
|
43
|
+
target, HITL gate, and telemetry.
|
|
44
|
+
|
|
45
|
+
[Unreleased]: https://github.com/erenat77/agentdeploy/compare/v0.1.1...HEAD
|
|
46
|
+
[0.1.1]: https://github.com/erenat77/agentdeploy/compare/v0.1.0...v0.1.1
|
|
47
|
+
[0.1.0]: https://github.com/erenat77/agentdeploy/releases/tag/v0.1.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aaron
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentdeploy
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Zero-boilerplate deployment for AI agent frameworks — LangGraph, CrewAI, OpenAI Agents SDK, and custom agents
|
|
5
|
+
Project-URL: Homepage, https://github.com/erenat77/agentdeploy
|
|
6
|
+
Project-URL: Repository, https://github.com/erenat77/agentdeploy
|
|
7
|
+
Project-URL: Issues, https://github.com/erenat77/agentdeploy/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/erenat77/agentdeploy#readme
|
|
9
|
+
Project-URL: Changelog, https://github.com/erenat77/agentdeploy/blob/main/CHANGELOG.md
|
|
10
|
+
Author: Aaron
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: agents,ai,crewai,deployment,docker,kubernetes,langgraph
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: httpx>=0.27
|
|
22
|
+
Requires-Dist: jinja2>=3.1
|
|
23
|
+
Requires-Dist: langgraph>=1.1.10
|
|
24
|
+
Requires-Dist: opentelemetry-api>=1.20
|
|
25
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.20
|
|
26
|
+
Requires-Dist: opentelemetry-sdk>=1.20
|
|
27
|
+
Requires-Dist: pydantic>=2.0
|
|
28
|
+
Requires-Dist: pyyaml>=6.0
|
|
29
|
+
Requires-Dist: rich>=13.0
|
|
30
|
+
Requires-Dist: typer>=0.12
|
|
31
|
+
Provides-Extra: all
|
|
32
|
+
Requires-Dist: anthropic>=0.34; extra == 'all'
|
|
33
|
+
Requires-Dist: boto3>=1.34; extra == 'all'
|
|
34
|
+
Requires-Dist: build>=1.2; extra == 'all'
|
|
35
|
+
Requires-Dist: crewai>=0.70; extra == 'all'
|
|
36
|
+
Requires-Dist: google-cloud-run>=0.10; extra == 'all'
|
|
37
|
+
Requires-Dist: kubernetes>=28.1; extra == 'all'
|
|
38
|
+
Requires-Dist: langgraph>=0.2; extra == 'all'
|
|
39
|
+
Requires-Dist: mypy>=1.10; extra == 'all'
|
|
40
|
+
Requires-Dist: openai>=1.50; extra == 'all'
|
|
41
|
+
Requires-Dist: pre-commit>=3.7; extra == 'all'
|
|
42
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'all'
|
|
43
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'all'
|
|
44
|
+
Requires-Dist: pytest>=8.0; extra == 'all'
|
|
45
|
+
Requires-Dist: ruff>=0.4; extra == 'all'
|
|
46
|
+
Requires-Dist: twine>=5.0; extra == 'all'
|
|
47
|
+
Provides-Extra: aws
|
|
48
|
+
Requires-Dist: boto3>=1.34; extra == 'aws'
|
|
49
|
+
Provides-Extra: claude
|
|
50
|
+
Requires-Dist: anthropic>=0.34; extra == 'claude'
|
|
51
|
+
Provides-Extra: crewai
|
|
52
|
+
Requires-Dist: crewai>=0.70; extra == 'crewai'
|
|
53
|
+
Provides-Extra: dev
|
|
54
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
55
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
56
|
+
Requires-Dist: pre-commit>=3.7; extra == 'dev'
|
|
57
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
58
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
59
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
60
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
61
|
+
Requires-Dist: twine>=5.0; extra == 'dev'
|
|
62
|
+
Provides-Extra: gcp
|
|
63
|
+
Requires-Dist: google-cloud-run>=0.10; extra == 'gcp'
|
|
64
|
+
Provides-Extra: k8s
|
|
65
|
+
Requires-Dist: kubernetes>=28.1; extra == 'k8s'
|
|
66
|
+
Provides-Extra: langgraph
|
|
67
|
+
Requires-Dist: langgraph>=0.2; extra == 'langgraph'
|
|
68
|
+
Provides-Extra: openai
|
|
69
|
+
Requires-Dist: openai>=1.50; extra == 'openai'
|
|
70
|
+
Description-Content-Type: text/markdown
|
|
71
|
+
|
|
72
|
+
# AgentDeploy
|
|
73
|
+
|
|
74
|
+
[](https://github.com/erenat77/agentdeploy/actions/workflows/ci.yml)
|
|
75
|
+
[](https://pypi.org/project/agentdeploy/)
|
|
76
|
+
[](https://pypi.org/project/agentdeploy/)
|
|
77
|
+
[](LICENSE)
|
|
78
|
+
|
|
79
|
+
**Zero-boilerplate deployment for AI agent frameworks.**
|
|
80
|
+
|
|
81
|
+
Take any LangGraph, CrewAI, OpenAI Agents SDK, or custom agent and generate production-ready Kubernetes manifests, Docker Compose files, Lambda handlers, or Cloud Run services — in under 10 lines of Python.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## The problem it solves
|
|
86
|
+
|
|
87
|
+
Every team building AI agents in 2025–2026 faces the same 3–6 week detour:
|
|
88
|
+
|
|
89
|
+
- Write the agent (30 min)
|
|
90
|
+
- Figure out how to containerise it (1 day)
|
|
91
|
+
- Write Kubernetes manifests with correct resource limits, health checks, and HPA (2 days)
|
|
92
|
+
- Add human-in-the-loop gates (1 week)
|
|
93
|
+
- Wire up OpenTelemetry tracing and cost tracking (3 days)
|
|
94
|
+
- Repeat for every new agent
|
|
95
|
+
|
|
96
|
+
AgentDeploy collapses this to a single fluent call.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Install
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# pip
|
|
104
|
+
pip install agentdeploy
|
|
105
|
+
|
|
106
|
+
# uv (recommended)
|
|
107
|
+
uv add agentdeploy
|
|
108
|
+
|
|
109
|
+
# With framework extras:
|
|
110
|
+
uv add "agentdeploy[langgraph]"
|
|
111
|
+
uv add "agentdeploy[crewai]"
|
|
112
|
+
uv add "agentdeploy[openai]"
|
|
113
|
+
uv add "agentdeploy[all]"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Quick start
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
from agentdeploy import AgentApp, deploy
|
|
122
|
+
|
|
123
|
+
# 1. Wrap your existing agent (framework auto-detected)
|
|
124
|
+
app = (
|
|
125
|
+
AgentApp("my-agent", description="Summarisation agent")
|
|
126
|
+
.wrap(my_langgraph_graph) # or CrewAI Crew, OpenAI Agent, callable
|
|
127
|
+
.env("ANTHROPIC_API_KEY", from_secret="anthropic-key")
|
|
128
|
+
.resources(memory_mb=2048, timeout_seconds=120)
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
# 2. Generate Kubernetes manifests + Dockerfile
|
|
132
|
+
result = (
|
|
133
|
+
deploy(app)
|
|
134
|
+
.to_kubernetes(namespace="agents", image="my-agent:0.1.0")
|
|
135
|
+
.with_replicas(2)
|
|
136
|
+
.with_autoscale(min=1, max=10, cpu_percent=60)
|
|
137
|
+
.with_hitl_gate(webhook="https://yourapp.com/api/approve")
|
|
138
|
+
.with_telemetry(endpoint="http://otel-collector:4317")
|
|
139
|
+
.build()
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
print(result)
|
|
143
|
+
# → Dockerfile, deployment.yaml, service.yaml, hpa.yaml, secret.yaml
|
|
144
|
+
# → kubectl apply -k ./deploy/my-agent/k8s/
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Supported frameworks
|
|
150
|
+
|
|
151
|
+
| Framework | Detection | Adapter |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| LangGraph | `CompiledStateGraph` type | `_LangGraphAdapter` |
|
|
154
|
+
| CrewAI | `crewai` module, `Crew` type | `_CrewAIAdapter` |
|
|
155
|
+
| OpenAI Agents SDK | `openai.agents` module | `_OpenAIAgentAdapter` |
|
|
156
|
+
| Any `async callable` | fallback | `_CallableAdapter` |
|
|
157
|
+
|
|
158
|
+
Custom framework? Register your own adapter:
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
from agentdeploy.adapters import AdapterRegistry, AgentAdapter
|
|
162
|
+
|
|
163
|
+
class MyAdapter(AgentAdapter):
|
|
164
|
+
framework_name = "my-framework"
|
|
165
|
+
def validate(self): ...
|
|
166
|
+
def pip_extras(self): return ["my-framework>=1.0"]
|
|
167
|
+
def entrypoint_code(self, app_name, port): return "..."
|
|
168
|
+
|
|
169
|
+
AdapterRegistry.register("my-framework", MyAdapter)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Deploy targets
|
|
175
|
+
|
|
176
|
+
### Kubernetes
|
|
177
|
+
```python
|
|
178
|
+
deploy(app).to_kubernetes(namespace="prod", image="myimg:1.0")
|
|
179
|
+
.with_replicas(3)
|
|
180
|
+
.with_autoscale(min=1, max=20, cpu_percent=70)
|
|
181
|
+
.with_hitl_gate(webhook="https://yourapp.com/approve")
|
|
182
|
+
.with_telemetry(endpoint="http://otel-collector:4317")
|
|
183
|
+
.build()
|
|
184
|
+
```
|
|
185
|
+
Generates: `Dockerfile`, `deployment.yaml`, `service.yaml`, `hpa.yaml`, `secret.yaml`, `kustomization.yaml`
|
|
186
|
+
|
|
187
|
+
### Docker Compose (local / staging)
|
|
188
|
+
```python
|
|
189
|
+
deploy(app).to_docker_compose()
|
|
190
|
+
.with_redis()
|
|
191
|
+
.with_otel_collector()
|
|
192
|
+
.build()
|
|
193
|
+
# → docker compose up --build
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### AWS Lambda
|
|
197
|
+
```python
|
|
198
|
+
deploy(app).to_lambda(region="us-east-1", function_name="my-agent")
|
|
199
|
+
.build()
|
|
200
|
+
# → sam build && sam deploy
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Google Cloud Run
|
|
204
|
+
```python
|
|
205
|
+
deploy(app).to_cloud_run(project="my-gcp-project", region="us-central1")
|
|
206
|
+
.with_scaling(min_instances=0, max_instances=20)
|
|
207
|
+
.build()
|
|
208
|
+
# → gcloud builds submit && gcloud run services replace ...
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Human-in-the-Loop (HITL)
|
|
214
|
+
|
|
215
|
+
Add human oversight at any decision point:
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
from agentdeploy import HITLGate, HITLDecision
|
|
219
|
+
|
|
220
|
+
gate = HITLGate(webhook="https://yourapp.com/api/approve")
|
|
221
|
+
|
|
222
|
+
async def run_agent(user_input):
|
|
223
|
+
state = await my_agent.ainvoke(user_input)
|
|
224
|
+
|
|
225
|
+
approval = await gate.checkpoint(
|
|
226
|
+
state=state,
|
|
227
|
+
description="Agent about to write to production database",
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
if approval.decision == HITLDecision.REJECT:
|
|
231
|
+
return {"status": "cancelled", "reason": approval.reason}
|
|
232
|
+
|
|
233
|
+
return approval.modified_state or state
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Your webhook endpoint resolves the checkpoint:
|
|
237
|
+
```python
|
|
238
|
+
from agentdeploy import HITLGate, HITLDecision, CheckpointResult
|
|
239
|
+
|
|
240
|
+
@app.post("/api/approve/{checkpoint_id}")
|
|
241
|
+
async def approve(checkpoint_id: str):
|
|
242
|
+
await gate.resolve(checkpoint_id, CheckpointResult(
|
|
243
|
+
decision=HITLDecision.APPROVE,
|
|
244
|
+
reviewer="alice@company.com",
|
|
245
|
+
))
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Delivery channels: `webhook=`, `slack_webhook=`, `console_fallback=True` (local dev)
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Telemetry
|
|
253
|
+
|
|
254
|
+
```python
|
|
255
|
+
from agentdeploy import Telemetry
|
|
256
|
+
|
|
257
|
+
telemetry = Telemetry("my-agent", otel_endpoint="http://otel-collector:4317")
|
|
258
|
+
|
|
259
|
+
async with telemetry.trace("invoke", input=user_input) as span:
|
|
260
|
+
result = await my_agent.ainvoke(user_input)
|
|
261
|
+
span.set_tokens(prompt=512, completion=128, model="claude-sonnet-4-6")
|
|
262
|
+
# → auto-calculates cost, writes span to OTel collector
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Built-in cost estimation for: `gpt-4o`, `gpt-4o-mini`, `claude-sonnet-4-6`, `claude-opus-4-6`, `gemini-1.5-pro`
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## CLI
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
# Scaffold a new project
|
|
273
|
+
agentdeploy init my-agent --framework langgraph --target kubernetes
|
|
274
|
+
|
|
275
|
+
# Validate config without building
|
|
276
|
+
agentdeploy validate
|
|
277
|
+
|
|
278
|
+
# Build artifacts
|
|
279
|
+
agentdeploy build --output ./deploy
|
|
280
|
+
|
|
281
|
+
# Dry run
|
|
282
|
+
agentdeploy build --dry-run
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Project layout (generated)
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
deploy/
|
|
291
|
+
└── my-agent/
|
|
292
|
+
├── Dockerfile
|
|
293
|
+
├── server.py # auto-generated FastAPI entrypoint
|
|
294
|
+
└── k8s/
|
|
295
|
+
├── deployment.yaml
|
|
296
|
+
├── service.yaml
|
|
297
|
+
├── hpa.yaml
|
|
298
|
+
├── secret.yaml # placeholder — fill in before applying
|
|
299
|
+
└── kustomization.yaml
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Apply to cluster:
|
|
303
|
+
```bash
|
|
304
|
+
kubectl apply -k ./deploy/my-agent/k8s/
|
|
305
|
+
kubectl rollout status deployment/my-agent -n agents
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Roadmap
|
|
311
|
+
|
|
312
|
+
- [ ] v0.2 — Helm chart output target
|
|
313
|
+
- [ ] v0.2 — Multi-agent topology (one app, N agent pods with message bus wiring)
|
|
314
|
+
- [ ] v0.3 — Budget enforcement middleware (per-run token caps)
|
|
315
|
+
- [ ] v0.3 — Replay debugger (capture + replay full execution traces)
|
|
316
|
+
- [ ] v0.4 — Pulumi / Terraform IaC output
|
|
317
|
+
- [ ] v0.5 — GitHub Actions / GitLab CI pipeline generation
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Contributing
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
git clone https://github.com/erenat77/agentdeploy
|
|
325
|
+
cd agentdeploy
|
|
326
|
+
uv pip install -e ".[dev]" # or: pip install -e ".[dev]"
|
|
327
|
+
pre-commit install
|
|
328
|
+
pytest tests/ -v
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
PRs welcome. Please add tests for new adapters and targets.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## License
|
|
336
|
+
|
|
337
|
+
MIT
|