agentic-systems 1.0.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.
- agentic_systems-1.0.0/MANIFEST.in +10 -0
- agentic_systems-1.0.0/PKG-INFO +335 -0
- agentic_systems-1.0.0/README.md +292 -0
- agentic_systems-1.0.0/pyproject.toml +70 -0
- agentic_systems-1.0.0/setup.cfg +4 -0
- agentic_systems-1.0.0/src/agentic_systems/__init__.py +92 -0
- agentic_systems-1.0.0/src/agentic_systems/agents.py +668 -0
- agentic_systems-1.0.0/src/agentic_systems/api.py +219 -0
- agentic_systems-1.0.0/src/agentic_systems/bedrock_runtime_client.py +299 -0
- agentic_systems-1.0.0/src/agentic_systems/chain.py +108 -0
- agentic_systems-1.0.0/src/agentic_systems/cli.py +266 -0
- agentic_systems-1.0.0/src/agentic_systems/contracts.py +545 -0
- agentic_systems-1.0.0/src/agentic_systems/core/__init__.py +41 -0
- agentic_systems-1.0.0/src/agentic_systems/core/agents.py +5 -0
- agentic_systems-1.0.0/src/agentic_systems/core/contracts.py +5 -0
- agentic_systems-1.0.0/src/agentic_systems/core/human_output.py +5 -0
- agentic_systems-1.0.0/src/agentic_systems/core/lineage.py +5 -0
- agentic_systems-1.0.0/src/agentic_systems/core/results.py +6 -0
- agentic_systems-1.0.0/src/agentic_systems/core/runtime.py +209 -0
- agentic_systems-1.0.0/src/agentic_systems/core/scheduler.py +219 -0
- agentic_systems-1.0.0/src/agentic_systems/core/tools.py +5 -0
- agentic_systems-1.0.0/src/agentic_systems/engines/__init__.py +15 -0
- agentic_systems-1.0.0/src/agentic_systems/engines/bedrock.py +69 -0
- agentic_systems-1.0.0/src/agentic_systems/engines/names.py +68 -0
- agentic_systems-1.0.0/src/agentic_systems/engines/python_direct.py +7 -0
- agentic_systems-1.0.0/src/agentic_systems/environments.py +802 -0
- agentic_systems-1.0.0/src/agentic_systems/errors.py +19 -0
- agentic_systems-1.0.0/src/agentic_systems/evals.py +384 -0
- agentic_systems-1.0.0/src/agentic_systems/expectations.py +68 -0
- agentic_systems-1.0.0/src/agentic_systems/factories.py +377 -0
- agentic_systems-1.0.0/src/agentic_systems/final_answer.py +191 -0
- agentic_systems-1.0.0/src/agentic_systems/human_output.py +925 -0
- agentic_systems-1.0.0/src/agentic_systems/integrations/__init__.py +10 -0
- agentic_systems-1.0.0/src/agentic_systems/integrations/langgraph.py +799 -0
- agentic_systems-1.0.0/src/agentic_systems/lineage.py +687 -0
- agentic_systems-1.0.0/src/agentic_systems/output_contracts.py +136 -0
- agentic_systems-1.0.0/src/agentic_systems/providers/__init__.py +43 -0
- agentic_systems-1.0.0/src/agentic_systems/providers/base.py +265 -0
- agentic_systems-1.0.0/src/agentic_systems/providers/bedrock_runtime.py +2959 -0
- agentic_systems-1.0.0/src/agentic_systems/providers/openai_runtime.py +349 -0
- agentic_systems-1.0.0/src/agentic_systems/providers/python_direct.py +327 -0
- agentic_systems-1.0.0/src/agentic_systems/providers/vllm_runtime.py +147 -0
- agentic_systems-1.0.0/src/agentic_systems/results.py +404 -0
- agentic_systems-1.0.0/src/agentic_systems/skills/__init__.py +14 -0
- agentic_systems-1.0.0/src/agentic_systems/skills/loader.py +134 -0
- agentic_systems-1.0.0/src/agentic_systems/skills/skill.py +230 -0
- agentic_systems-1.0.0/src/agentic_systems/system.py +604 -0
- agentic_systems-1.0.0/src/agentic_systems/tools/__init__.py +15 -0
- agentic_systems-1.0.0/src/agentic_systems/tools/compat.py +159 -0
- agentic_systems-1.0.0/src/agentic_systems/tools/decorators.py +105 -0
- agentic_systems-1.0.0/src/agentic_systems/tools/tool.py +319 -0
- agentic_systems-1.0.0/src/agentic_systems/utils.py +1511 -0
- agentic_systems-1.0.0/src/agentic_systems.egg-info/PKG-INFO +335 -0
- agentic_systems-1.0.0/src/agentic_systems.egg-info/SOURCES.txt +56 -0
- agentic_systems-1.0.0/src/agentic_systems.egg-info/dependency_links.txt +1 -0
- agentic_systems-1.0.0/src/agentic_systems.egg-info/entry_points.txt +2 -0
- agentic_systems-1.0.0/src/agentic_systems.egg-info/requires.txt +37 -0
- agentic_systems-1.0.0/src/agentic_systems.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentic-systems
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Agentic Systems: auditable agentic systems with tools, skills, agents, systems, graphs, environments and evals across Python Direct, OpenAI Runtime, Bedrock Runtime and vLLM Runtime.
|
|
5
|
+
Author-email: Jacobo Gerardo Gonzalez Leon <jacobogerardo.gonzalez@bbva.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://www.github.com/JacoboGGLeon/agentic_systems
|
|
8
|
+
Project-URL: Repository, https://www.github.com/JacoboGGLeon/agentic_systems
|
|
9
|
+
Project-URL: LinkedIn, https://www.linkedin.com/in/jacoboggleon/
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: pydantic>=2.7.0
|
|
13
|
+
Requires-Dist: pandas>=2.0.0
|
|
14
|
+
Requires-Dist: typing-extensions>=4.10.0
|
|
15
|
+
Requires-Dist: rich>=13.0.0
|
|
16
|
+
Provides-Extra: bedrock
|
|
17
|
+
Requires-Dist: boto3>=1.34.0; extra == "bedrock"
|
|
18
|
+
Requires-Dist: botocore>=1.34.0; extra == "bedrock"
|
|
19
|
+
Provides-Extra: langgraph
|
|
20
|
+
Requires-Dist: langgraph>=0.2.0; extra == "langgraph"
|
|
21
|
+
Requires-Dist: typing-extensions>=4.10.0; extra == "langgraph"
|
|
22
|
+
Provides-Extra: openai
|
|
23
|
+
Requires-Dist: openai>=1.0.0; extra == "openai"
|
|
24
|
+
Provides-Extra: tutorials
|
|
25
|
+
Requires-Dist: ipykernel>=6.0.0; extra == "tutorials"
|
|
26
|
+
Requires-Dist: jupyterlab>=4.0.0; extra == "tutorials"
|
|
27
|
+
Requires-Dist: pandas>=2.0.0; extra == "tutorials"
|
|
28
|
+
Requires-Dist: rich>=13.0.0; extra == "tutorials"
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
31
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
|
|
32
|
+
Requires-Dist: ruff>=0.6.1; extra == "dev"
|
|
33
|
+
Provides-Extra: all
|
|
34
|
+
Requires-Dist: boto3>=1.34.0; extra == "all"
|
|
35
|
+
Requires-Dist: botocore>=1.34.0; extra == "all"
|
|
36
|
+
Requires-Dist: langgraph>=0.2.0; extra == "all"
|
|
37
|
+
Requires-Dist: openai>=1.0.0; extra == "all"
|
|
38
|
+
Requires-Dist: ipykernel>=6.0.0; extra == "all"
|
|
39
|
+
Requires-Dist: jupyterlab>=4.0.0; extra == "all"
|
|
40
|
+
Requires-Dist: pytest>=8.0.0; extra == "all"
|
|
41
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == "all"
|
|
42
|
+
Requires-Dist: ruff>=0.6.1; extra == "all"
|
|
43
|
+
|
|
44
|
+
# Agentic Systems
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<img src="https://raw.githubusercontent.com/JacoboGGLeon/agentic_systems/main/docs/assets/logo_agentic_systems.png" alt="Agentic Systems logo" width="360" />
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
Agentic Systems is a Python library for building, running and evaluating
|
|
52
|
+
auditable agentic systems with tools, skills, agents, systems, graphs,
|
|
53
|
+
environments, evals, contracts, lineage memory and stable human output.
|
|
54
|
+
|
|
55
|
+
Use the public facade as the stable entry point:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
import agentic_systems as toolkit
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Agentic Systems exposes five practical routes:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
toolkit top-level public facade for normal user code
|
|
65
|
+
primitives Tool, Skill, Agent, RunResult, contracts, runtime and lineage
|
|
66
|
+
providers execution backends: python-runtime, openai-runtime, bedrock-runtime, vllm-runtime or auto
|
|
67
|
+
system AgenticSystem as the native composition layer
|
|
68
|
+
integrations bridges to external agent frameworks such as LangGraph, Strands and OpenAI Agents
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The recommended path is to start with `toolkit`, choose a provider with
|
|
72
|
+
`toolkit.runtime(provider=...)`, use primitives when you need fine control, move
|
|
73
|
+
to `AgenticSystem` when you need a complete auditable system, and use
|
|
74
|
+
integrations only when an external framework should own orchestration. Providers
|
|
75
|
+
can cross with either native systems or integrations: the framework owns the
|
|
76
|
+
loop, while the provider decides where inference or deterministic execution runs.
|
|
77
|
+
|
|
78
|
+
Agentic Systems supports two agent styles:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
deterministic agents execute explicit tools and local Python policies with python-runtime
|
|
82
|
+
reasoning agents use language-model providers such as openai-runtime, bedrock-runtime or vllm-runtime
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Both styles share the same lifecycle: tools expose executable capabilities,
|
|
86
|
+
agents transform context into actions, systems/graphs coordinate agents,
|
|
87
|
+
environments run episodes, and evals validate behavior with empirical evidence.
|
|
88
|
+
|
|
89
|
+
## Quality Gate
|
|
90
|
+
|
|
91
|
+
Current verified test status is documented in [`docs/PYTEST_COVERAGE_REPORT.md`](docs/PYTEST_COVERAGE_REPORT.md):
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
295 passed, 1 skipped
|
|
95
|
+
Coverage: 100.00%
|
|
96
|
+
TOTAL statements: 5173
|
|
97
|
+
TOTAL missing: 0
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## What It Exposes
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
Tool executable capability
|
|
104
|
+
Skill package of tools, instructions, contracts and assets
|
|
105
|
+
Agent deterministic or reasoning unit that turns context into actions
|
|
106
|
+
System workspace that registers and composes tools, skills and agents
|
|
107
|
+
Graph state + nodes + edges orchestration
|
|
108
|
+
Environment episodic execution with reward and history
|
|
109
|
+
Eval empirical validation and scoring over cases or episodes
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Cross-cutting APIs:
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
runtime/provider python-runtime, openai-runtime, bedrock-runtime, vllm-runtime or auto
|
|
116
|
+
scheduler execution budgets, retries, turns, timeouts and concurrency
|
|
117
|
+
contracts/policies expected tools, strictness, repair and finalization rules
|
|
118
|
+
Lineage Memory traceability, context, memory and audit trail
|
|
119
|
+
RunResult stable execution envelope and final answer
|
|
120
|
+
human_result readable output for users, notebooks and reviews
|
|
121
|
+
CLI diagnostics doctor, runtime, API inventory and contact
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Providers And Integrations
|
|
125
|
+
|
|
126
|
+
Canonical providers:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
python-runtime deterministic local execution for tools and policies
|
|
130
|
+
openai-runtime native OpenAI language-model provider
|
|
131
|
+
bedrock-runtime AWS Bedrock Runtime language-model provider
|
|
132
|
+
vllm-runtime OpenAI-compatible vLLM provider for local or Colab GPU inference
|
|
133
|
+
auto environment-based provider selection
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Optional integrations:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
LangGraph graph orchestration framework
|
|
140
|
+
Strands external agent framework integration
|
|
141
|
+
OpenAI Agents OpenAI Agents-style framework integration
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`provider="auto"` is explicit selection mode. Use `runtime.describe()` or the
|
|
145
|
+
CLI to see what the current environment selects before executing a model. The
|
|
146
|
+
current priority is `vllm-runtime`, then `openai-runtime`, then
|
|
147
|
+
`bedrock-runtime`.
|
|
148
|
+
|
|
149
|
+
OpenAI runtime reads `OPENAI_API_KEY`, `AGENTIC_SYSTEMS_OPENAI_MODEL_ID`,
|
|
150
|
+
`OPENAI_MODEL_ID`, `OPENAI_MODEL`, `OPENAI_BASE_URL`, `OPENAI_ORG_ID` and
|
|
151
|
+
`OPENAI_PROJECT` from the environment or `.env`. Diagnostics show safe flags,
|
|
152
|
+
not secret values.
|
|
153
|
+
|
|
154
|
+
vLLM runtime reads `VLLM_BASE_URL`, `VLLM_API_BASE`,
|
|
155
|
+
`AGENTIC_SYSTEMS_VLLM_BASE_URL`, `VLLM_MODEL_ID`, `VLLM_MODEL`,
|
|
156
|
+
`AGENTIC_SYSTEMS_VLLM_MODEL_ID`, `VLLM_API_KEY` and
|
|
157
|
+
`AGENTIC_SYSTEMS_VLLM_API_KEY`. It talks to a running vLLM OpenAI-compatible
|
|
158
|
+
server; the package does not start or install the GPU server by default.
|
|
159
|
+
|
|
160
|
+
## Quick Start
|
|
161
|
+
|
|
162
|
+
### Route 1: Toolkit And Primitives
|
|
163
|
+
|
|
164
|
+
Use this when you want direct control over tools, agents, provider/runtime and results.
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
import agentic_systems as toolkit
|
|
168
|
+
|
|
169
|
+
@toolkit.tool
|
|
170
|
+
def add(a: int, b: int) -> dict:
|
|
171
|
+
return {"result": a + b}
|
|
172
|
+
|
|
173
|
+
runtime = toolkit.runtime(provider="python-runtime")
|
|
174
|
+
agent = toolkit.agent(name="calc", tools=[add], runtime=runtime)
|
|
175
|
+
|
|
176
|
+
result = agent.run({"tool": "add", "input": {"a": 2, "b": 3}}, mode="eval")
|
|
177
|
+
toolkit.human_result(result)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Route 2: Native System
|
|
181
|
+
|
|
182
|
+
Use this when you want a complete Agentic Systems workspace that registers and
|
|
183
|
+
composes tools, skills and agents under one auditable system boundary. The
|
|
184
|
+
system still receives a provider through `toolkit.runtime(...)`.
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
import agentic_systems as toolkit
|
|
188
|
+
|
|
189
|
+
system = toolkit.AgenticSystem(model="local-python", runtime=toolkit.runtime(provider="python-runtime"))
|
|
190
|
+
|
|
191
|
+
@system.tool
|
|
192
|
+
def add(a: int, b: int) -> dict:
|
|
193
|
+
return {"result": a + b}
|
|
194
|
+
|
|
195
|
+
agent = system.agent(name="calc", instructions="Use the registered calculator tools.")
|
|
196
|
+
result = agent.run({"tool": "add", "input": {"a": 2, "b": 3}}, mode="eval")
|
|
197
|
+
|
|
198
|
+
toolkit.human_result(result)
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Route 3: Environment And Evals
|
|
202
|
+
|
|
203
|
+
Use an environment when execution is episodic: each record becomes a step, the
|
|
204
|
+
system graph updates state, a reward function scores the transition, and history
|
|
205
|
+
keeps auditable evidence. Use evals when you want batch validation over declared
|
|
206
|
+
cases with pass/fail statistics.
|
|
207
|
+
|
|
208
|
+
```python
|
|
209
|
+
import agentic_systems as toolkit
|
|
210
|
+
|
|
211
|
+
runtime = toolkit.runtime(provider="python-runtime")
|
|
212
|
+
system = toolkit.AgenticSystem(model="local-python", runtime=runtime)
|
|
213
|
+
|
|
214
|
+
@system.tool
|
|
215
|
+
def double(value: int) -> dict:
|
|
216
|
+
return {"value": value * 2, "ok": True}
|
|
217
|
+
|
|
218
|
+
agent = system.agent(
|
|
219
|
+
name="doubler",
|
|
220
|
+
instructions="Call double when the input asks for a doubled value.",
|
|
221
|
+
tools=["double"],
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
graph = toolkit.build_single_agent_step_graph(agent)
|
|
225
|
+
records = [
|
|
226
|
+
{"input": {"tool": "double", "input": {"value": 21}}},
|
|
227
|
+
]
|
|
228
|
+
|
|
229
|
+
def reward_fn(state, row, action, env) -> float:
|
|
230
|
+
return 1.0 if state.get("result", {}).get("ok") else 0.0
|
|
231
|
+
|
|
232
|
+
environment = system.environment(records, graph=graph, reward_fn=reward_fn)
|
|
233
|
+
observation, info = environment.reset(seed=0)
|
|
234
|
+
observation, reward, terminated, truncated, info = environment.step()
|
|
235
|
+
|
|
236
|
+
toolkit.show(toolkit.environment_summary(environment), title="Environment summary")
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
```python
|
|
240
|
+
cases = [
|
|
241
|
+
{
|
|
242
|
+
"name": "double_21",
|
|
243
|
+
"input": {"tool": "double", "input": {"value": 21}},
|
|
244
|
+
"expected": {"data_contains": {"value": 42, "ok": True}},
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
|
|
248
|
+
report = system.eval(agent, cases)
|
|
249
|
+
toolkit.human_result(report)
|
|
250
|
+
report.raise_if_failed()
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Route 4: Integrations
|
|
254
|
+
|
|
255
|
+
Use integrations when LangGraph, Strands or OpenAI Agents should own the outer
|
|
256
|
+
framework loop while Agentic Systems keeps the same tools, provider/runtime,
|
|
257
|
+
contracts, lineage and human output conventions.
|
|
258
|
+
|
|
259
|
+
```python
|
|
260
|
+
runtime = toolkit.runtime(provider="auto")
|
|
261
|
+
agent = toolkit.agent(
|
|
262
|
+
name="portable_agent",
|
|
263
|
+
runtime=runtime,
|
|
264
|
+
framework="openai-agents",
|
|
265
|
+
)
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## CLI
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
agentic-systems version
|
|
272
|
+
agentic-systems contact
|
|
273
|
+
agentic-systems doctor --json
|
|
274
|
+
agentic-systems runtime --provider auto --json
|
|
275
|
+
agentic-systems api --tier public --json
|
|
276
|
+
agentic-systems public-api --all --json
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## Tutorials
|
|
280
|
+
|
|
281
|
+
The official learning path is `tutorials/`:
|
|
282
|
+
|
|
283
|
+
```text
|
|
284
|
+
tutorials/00_runtime_api.ipynb
|
|
285
|
+
tutorials/00_runtime_bedrock_provider_api.ipynb
|
|
286
|
+
tutorials/00_runtime_openai_provider_api.ipynb
|
|
287
|
+
tutorials/00_runtime_vllm_provider_api.ipynb
|
|
288
|
+
tutorials/00_runtime_scheduler_api.ipynb
|
|
289
|
+
tutorials/01_tool_api.ipynb
|
|
290
|
+
tutorials/02_skill_api.ipynb
|
|
291
|
+
tutorials/03_agent_api.ipynb
|
|
292
|
+
tutorials/04_human_result_api.ipynb
|
|
293
|
+
tutorials/05_lineage_memory_api.ipynb
|
|
294
|
+
tutorials/06_integrations_strands_api.ipynb
|
|
295
|
+
tutorials/07_integrations_openai_runtime_api.ipynb
|
|
296
|
+
tutorials/08_system_api.ipynb
|
|
297
|
+
tutorials/09_graph_api.ipynb
|
|
298
|
+
tutorials/10_environment_eval_api.ipynb
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
There is no active `examples/` root. Tutorials both explain and exercise the API.
|
|
302
|
+
|
|
303
|
+
## Docs
|
|
304
|
+
|
|
305
|
+
```text
|
|
306
|
+
docs/API.md
|
|
307
|
+
docs/CLI.md
|
|
308
|
+
docs/ARCHITECTURE.md
|
|
309
|
+
docs/BOUNDARIES.md
|
|
310
|
+
docs/ONBOARDING_FIRST_RUN.md
|
|
311
|
+
docs/RUNRESULT_FINAL_ANSWER.md
|
|
312
|
+
docs/SMOKE_CHECKLIST_2_4_9.md
|
|
313
|
+
docs/CONTRIBUTING_CHECKLIST.md
|
|
314
|
+
docs/ROADMAP_CHECKPOINTS.md
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Validation
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
python -m pytest -q
|
|
321
|
+
python -m compileall -q src tests tutorials
|
|
322
|
+
agentic-systems doctor --json
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
## Contact
|
|
326
|
+
|
|
327
|
+
Author: Jacobo Gerardo González León
|
|
328
|
+
|
|
329
|
+
E-Mail 1: jacobogerardo.gonzalez@bbva.com
|
|
330
|
+
|
|
331
|
+
E-Mail 2: jacoboggleon@gmail.com
|
|
332
|
+
|
|
333
|
+
LinkedIn: https://www.linkedin.com/in/jacoboggleon/
|
|
334
|
+
|
|
335
|
+
Github Repo: https://www.github.com/JacoboGGLeon/agentic_systems
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# Agentic Systems
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/JacoboGGLeon/agentic_systems/main/docs/assets/logo_agentic_systems.png" alt="Agentic Systems logo" width="360" />
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Agentic Systems is a Python library for building, running and evaluating
|
|
9
|
+
auditable agentic systems with tools, skills, agents, systems, graphs,
|
|
10
|
+
environments, evals, contracts, lineage memory and stable human output.
|
|
11
|
+
|
|
12
|
+
Use the public facade as the stable entry point:
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
import agentic_systems as toolkit
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Agentic Systems exposes five practical routes:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
toolkit top-level public facade for normal user code
|
|
22
|
+
primitives Tool, Skill, Agent, RunResult, contracts, runtime and lineage
|
|
23
|
+
providers execution backends: python-runtime, openai-runtime, bedrock-runtime, vllm-runtime or auto
|
|
24
|
+
system AgenticSystem as the native composition layer
|
|
25
|
+
integrations bridges to external agent frameworks such as LangGraph, Strands and OpenAI Agents
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The recommended path is to start with `toolkit`, choose a provider with
|
|
29
|
+
`toolkit.runtime(provider=...)`, use primitives when you need fine control, move
|
|
30
|
+
to `AgenticSystem` when you need a complete auditable system, and use
|
|
31
|
+
integrations only when an external framework should own orchestration. Providers
|
|
32
|
+
can cross with either native systems or integrations: the framework owns the
|
|
33
|
+
loop, while the provider decides where inference or deterministic execution runs.
|
|
34
|
+
|
|
35
|
+
Agentic Systems supports two agent styles:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
deterministic agents execute explicit tools and local Python policies with python-runtime
|
|
39
|
+
reasoning agents use language-model providers such as openai-runtime, bedrock-runtime or vllm-runtime
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Both styles share the same lifecycle: tools expose executable capabilities,
|
|
43
|
+
agents transform context into actions, systems/graphs coordinate agents,
|
|
44
|
+
environments run episodes, and evals validate behavior with empirical evidence.
|
|
45
|
+
|
|
46
|
+
## Quality Gate
|
|
47
|
+
|
|
48
|
+
Current verified test status is documented in [`docs/PYTEST_COVERAGE_REPORT.md`](docs/PYTEST_COVERAGE_REPORT.md):
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
295 passed, 1 skipped
|
|
52
|
+
Coverage: 100.00%
|
|
53
|
+
TOTAL statements: 5173
|
|
54
|
+
TOTAL missing: 0
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## What It Exposes
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
Tool executable capability
|
|
61
|
+
Skill package of tools, instructions, contracts and assets
|
|
62
|
+
Agent deterministic or reasoning unit that turns context into actions
|
|
63
|
+
System workspace that registers and composes tools, skills and agents
|
|
64
|
+
Graph state + nodes + edges orchestration
|
|
65
|
+
Environment episodic execution with reward and history
|
|
66
|
+
Eval empirical validation and scoring over cases or episodes
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Cross-cutting APIs:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
runtime/provider python-runtime, openai-runtime, bedrock-runtime, vllm-runtime or auto
|
|
73
|
+
scheduler execution budgets, retries, turns, timeouts and concurrency
|
|
74
|
+
contracts/policies expected tools, strictness, repair and finalization rules
|
|
75
|
+
Lineage Memory traceability, context, memory and audit trail
|
|
76
|
+
RunResult stable execution envelope and final answer
|
|
77
|
+
human_result readable output for users, notebooks and reviews
|
|
78
|
+
CLI diagnostics doctor, runtime, API inventory and contact
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Providers And Integrations
|
|
82
|
+
|
|
83
|
+
Canonical providers:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
python-runtime deterministic local execution for tools and policies
|
|
87
|
+
openai-runtime native OpenAI language-model provider
|
|
88
|
+
bedrock-runtime AWS Bedrock Runtime language-model provider
|
|
89
|
+
vllm-runtime OpenAI-compatible vLLM provider for local or Colab GPU inference
|
|
90
|
+
auto environment-based provider selection
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Optional integrations:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
LangGraph graph orchestration framework
|
|
97
|
+
Strands external agent framework integration
|
|
98
|
+
OpenAI Agents OpenAI Agents-style framework integration
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`provider="auto"` is explicit selection mode. Use `runtime.describe()` or the
|
|
102
|
+
CLI to see what the current environment selects before executing a model. The
|
|
103
|
+
current priority is `vllm-runtime`, then `openai-runtime`, then
|
|
104
|
+
`bedrock-runtime`.
|
|
105
|
+
|
|
106
|
+
OpenAI runtime reads `OPENAI_API_KEY`, `AGENTIC_SYSTEMS_OPENAI_MODEL_ID`,
|
|
107
|
+
`OPENAI_MODEL_ID`, `OPENAI_MODEL`, `OPENAI_BASE_URL`, `OPENAI_ORG_ID` and
|
|
108
|
+
`OPENAI_PROJECT` from the environment or `.env`. Diagnostics show safe flags,
|
|
109
|
+
not secret values.
|
|
110
|
+
|
|
111
|
+
vLLM runtime reads `VLLM_BASE_URL`, `VLLM_API_BASE`,
|
|
112
|
+
`AGENTIC_SYSTEMS_VLLM_BASE_URL`, `VLLM_MODEL_ID`, `VLLM_MODEL`,
|
|
113
|
+
`AGENTIC_SYSTEMS_VLLM_MODEL_ID`, `VLLM_API_KEY` and
|
|
114
|
+
`AGENTIC_SYSTEMS_VLLM_API_KEY`. It talks to a running vLLM OpenAI-compatible
|
|
115
|
+
server; the package does not start or install the GPU server by default.
|
|
116
|
+
|
|
117
|
+
## Quick Start
|
|
118
|
+
|
|
119
|
+
### Route 1: Toolkit And Primitives
|
|
120
|
+
|
|
121
|
+
Use this when you want direct control over tools, agents, provider/runtime and results.
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
import agentic_systems as toolkit
|
|
125
|
+
|
|
126
|
+
@toolkit.tool
|
|
127
|
+
def add(a: int, b: int) -> dict:
|
|
128
|
+
return {"result": a + b}
|
|
129
|
+
|
|
130
|
+
runtime = toolkit.runtime(provider="python-runtime")
|
|
131
|
+
agent = toolkit.agent(name="calc", tools=[add], runtime=runtime)
|
|
132
|
+
|
|
133
|
+
result = agent.run({"tool": "add", "input": {"a": 2, "b": 3}}, mode="eval")
|
|
134
|
+
toolkit.human_result(result)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Route 2: Native System
|
|
138
|
+
|
|
139
|
+
Use this when you want a complete Agentic Systems workspace that registers and
|
|
140
|
+
composes tools, skills and agents under one auditable system boundary. The
|
|
141
|
+
system still receives a provider through `toolkit.runtime(...)`.
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
import agentic_systems as toolkit
|
|
145
|
+
|
|
146
|
+
system = toolkit.AgenticSystem(model="local-python", runtime=toolkit.runtime(provider="python-runtime"))
|
|
147
|
+
|
|
148
|
+
@system.tool
|
|
149
|
+
def add(a: int, b: int) -> dict:
|
|
150
|
+
return {"result": a + b}
|
|
151
|
+
|
|
152
|
+
agent = system.agent(name="calc", instructions="Use the registered calculator tools.")
|
|
153
|
+
result = agent.run({"tool": "add", "input": {"a": 2, "b": 3}}, mode="eval")
|
|
154
|
+
|
|
155
|
+
toolkit.human_result(result)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Route 3: Environment And Evals
|
|
159
|
+
|
|
160
|
+
Use an environment when execution is episodic: each record becomes a step, the
|
|
161
|
+
system graph updates state, a reward function scores the transition, and history
|
|
162
|
+
keeps auditable evidence. Use evals when you want batch validation over declared
|
|
163
|
+
cases with pass/fail statistics.
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
import agentic_systems as toolkit
|
|
167
|
+
|
|
168
|
+
runtime = toolkit.runtime(provider="python-runtime")
|
|
169
|
+
system = toolkit.AgenticSystem(model="local-python", runtime=runtime)
|
|
170
|
+
|
|
171
|
+
@system.tool
|
|
172
|
+
def double(value: int) -> dict:
|
|
173
|
+
return {"value": value * 2, "ok": True}
|
|
174
|
+
|
|
175
|
+
agent = system.agent(
|
|
176
|
+
name="doubler",
|
|
177
|
+
instructions="Call double when the input asks for a doubled value.",
|
|
178
|
+
tools=["double"],
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
graph = toolkit.build_single_agent_step_graph(agent)
|
|
182
|
+
records = [
|
|
183
|
+
{"input": {"tool": "double", "input": {"value": 21}}},
|
|
184
|
+
]
|
|
185
|
+
|
|
186
|
+
def reward_fn(state, row, action, env) -> float:
|
|
187
|
+
return 1.0 if state.get("result", {}).get("ok") else 0.0
|
|
188
|
+
|
|
189
|
+
environment = system.environment(records, graph=graph, reward_fn=reward_fn)
|
|
190
|
+
observation, info = environment.reset(seed=0)
|
|
191
|
+
observation, reward, terminated, truncated, info = environment.step()
|
|
192
|
+
|
|
193
|
+
toolkit.show(toolkit.environment_summary(environment), title="Environment summary")
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
cases = [
|
|
198
|
+
{
|
|
199
|
+
"name": "double_21",
|
|
200
|
+
"input": {"tool": "double", "input": {"value": 21}},
|
|
201
|
+
"expected": {"data_contains": {"value": 42, "ok": True}},
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
|
|
205
|
+
report = system.eval(agent, cases)
|
|
206
|
+
toolkit.human_result(report)
|
|
207
|
+
report.raise_if_failed()
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Route 4: Integrations
|
|
211
|
+
|
|
212
|
+
Use integrations when LangGraph, Strands or OpenAI Agents should own the outer
|
|
213
|
+
framework loop while Agentic Systems keeps the same tools, provider/runtime,
|
|
214
|
+
contracts, lineage and human output conventions.
|
|
215
|
+
|
|
216
|
+
```python
|
|
217
|
+
runtime = toolkit.runtime(provider="auto")
|
|
218
|
+
agent = toolkit.agent(
|
|
219
|
+
name="portable_agent",
|
|
220
|
+
runtime=runtime,
|
|
221
|
+
framework="openai-agents",
|
|
222
|
+
)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## CLI
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
agentic-systems version
|
|
229
|
+
agentic-systems contact
|
|
230
|
+
agentic-systems doctor --json
|
|
231
|
+
agentic-systems runtime --provider auto --json
|
|
232
|
+
agentic-systems api --tier public --json
|
|
233
|
+
agentic-systems public-api --all --json
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Tutorials
|
|
237
|
+
|
|
238
|
+
The official learning path is `tutorials/`:
|
|
239
|
+
|
|
240
|
+
```text
|
|
241
|
+
tutorials/00_runtime_api.ipynb
|
|
242
|
+
tutorials/00_runtime_bedrock_provider_api.ipynb
|
|
243
|
+
tutorials/00_runtime_openai_provider_api.ipynb
|
|
244
|
+
tutorials/00_runtime_vllm_provider_api.ipynb
|
|
245
|
+
tutorials/00_runtime_scheduler_api.ipynb
|
|
246
|
+
tutorials/01_tool_api.ipynb
|
|
247
|
+
tutorials/02_skill_api.ipynb
|
|
248
|
+
tutorials/03_agent_api.ipynb
|
|
249
|
+
tutorials/04_human_result_api.ipynb
|
|
250
|
+
tutorials/05_lineage_memory_api.ipynb
|
|
251
|
+
tutorials/06_integrations_strands_api.ipynb
|
|
252
|
+
tutorials/07_integrations_openai_runtime_api.ipynb
|
|
253
|
+
tutorials/08_system_api.ipynb
|
|
254
|
+
tutorials/09_graph_api.ipynb
|
|
255
|
+
tutorials/10_environment_eval_api.ipynb
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
There is no active `examples/` root. Tutorials both explain and exercise the API.
|
|
259
|
+
|
|
260
|
+
## Docs
|
|
261
|
+
|
|
262
|
+
```text
|
|
263
|
+
docs/API.md
|
|
264
|
+
docs/CLI.md
|
|
265
|
+
docs/ARCHITECTURE.md
|
|
266
|
+
docs/BOUNDARIES.md
|
|
267
|
+
docs/ONBOARDING_FIRST_RUN.md
|
|
268
|
+
docs/RUNRESULT_FINAL_ANSWER.md
|
|
269
|
+
docs/SMOKE_CHECKLIST_2_4_9.md
|
|
270
|
+
docs/CONTRIBUTING_CHECKLIST.md
|
|
271
|
+
docs/ROADMAP_CHECKPOINTS.md
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Validation
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
python -m pytest -q
|
|
278
|
+
python -m compileall -q src tests tutorials
|
|
279
|
+
agentic-systems doctor --json
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## Contact
|
|
283
|
+
|
|
284
|
+
Author: Jacobo Gerardo González León
|
|
285
|
+
|
|
286
|
+
E-Mail 1: jacobogerardo.gonzalez@bbva.com
|
|
287
|
+
|
|
288
|
+
E-Mail 2: jacoboggleon@gmail.com
|
|
289
|
+
|
|
290
|
+
LinkedIn: https://www.linkedin.com/in/jacoboggleon/
|
|
291
|
+
|
|
292
|
+
Github Repo: https://www.github.com/JacoboGGLeon/agentic_systems
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "agentic-systems"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Agentic Systems: auditable agentic systems with tools, skills, agents, systems, graphs, environments and evals across Python Direct, OpenAI Runtime, Bedrock Runtime and vLLM Runtime."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{name = "Jacobo Gerardo Gonzalez Leon", email = "jacobogerardo.gonzalez@bbva.com"}]
|
|
13
|
+
dependencies = [
|
|
14
|
+
"pydantic>=2.7.0",
|
|
15
|
+
"pandas>=2.0.0",
|
|
16
|
+
"typing-extensions>=4.10.0",
|
|
17
|
+
"rich>=13.0.0",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://www.github.com/JacoboGGLeon/agentic_systems"
|
|
23
|
+
Repository = "https://www.github.com/JacoboGGLeon/agentic_systems"
|
|
24
|
+
LinkedIn = "https://www.linkedin.com/in/jacoboggleon/"
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
bedrock = ["boto3>=1.34.0", "botocore>=1.34.0"]
|
|
28
|
+
langgraph = ["langgraph>=0.2.0", "typing-extensions>=4.10.0"]
|
|
29
|
+
openai = ["openai>=1.0.0"]
|
|
30
|
+
tutorials = ["ipykernel>=6.0.0", "jupyterlab>=4.0.0", "pandas>=2.0.0", "rich>=13.0.0"]
|
|
31
|
+
dev = ["pytest>=8.0.0", "pytest-cov>=5.0.0", "ruff>=0.6.1"]
|
|
32
|
+
all = [
|
|
33
|
+
"boto3>=1.34.0",
|
|
34
|
+
"botocore>=1.34.0",
|
|
35
|
+
"langgraph>=0.2.0",
|
|
36
|
+
"openai>=1.0.0",
|
|
37
|
+
"ipykernel>=6.0.0",
|
|
38
|
+
"jupyterlab>=4.0.0",
|
|
39
|
+
"pytest>=8.0.0",
|
|
40
|
+
"pytest-cov>=5.0.0",
|
|
41
|
+
"ruff>=0.6.1",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[project.scripts]
|
|
45
|
+
agentic-systems = "agentic_systems.cli:main"
|
|
46
|
+
|
|
47
|
+
[tool.setuptools.packages.find]
|
|
48
|
+
where = ["src"]
|
|
49
|
+
include = ["agentic_systems*"]
|
|
50
|
+
|
|
51
|
+
[tool.pytest.ini_options]
|
|
52
|
+
pythonpath = ["src"]
|
|
53
|
+
testpaths = ["tests"]
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
[tool.coverage.run]
|
|
57
|
+
source = ["src/agentic_systems"]
|
|
58
|
+
omit = [
|
|
59
|
+
"src/agentic_systems/providers/bedrock_runtime.py",
|
|
60
|
+
]
|
|
61
|
+
|
|
62
|
+
[tool.coverage.report]
|
|
63
|
+
show_missing = true
|
|
64
|
+
skip_covered = false
|
|
65
|
+
fail_under = 100
|
|
66
|
+
exclude_lines = [
|
|
67
|
+
"pragma: no cover",
|
|
68
|
+
"if TYPE_CHECKING:",
|
|
69
|
+
"\\.\\.\\.",
|
|
70
|
+
]
|