idun-agent-engine 0.3.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. idun_agent_engine-0.3.7/.gitignore +207 -0
  2. idun_agent_engine-0.3.7/PKG-INFO +335 -0
  3. idun_agent_engine-0.3.7/README.md +274 -0
  4. idun_agent_engine-0.3.7/pyproject.toml +184 -0
  5. idun_agent_engine-0.3.7/src/idun_agent_engine/__init__.py +24 -0
  6. idun_agent_engine-0.3.7/src/idun_agent_engine/_version.py +3 -0
  7. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/__init__.py +10 -0
  8. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/adk/__init__.py +5 -0
  9. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/adk/adk.py +296 -0
  10. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/base.py +112 -0
  11. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/haystack/__init__.py +9 -0
  12. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/haystack/haystack.py +274 -0
  13. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/haystack/haystack_model.py +13 -0
  14. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/haystack/utils.py +13 -0
  15. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/langgraph/__init__.py +7 -0
  16. idun_agent_engine-0.3.7/src/idun_agent_engine/agent/langgraph/langgraph.py +553 -0
  17. idun_agent_engine-0.3.7/src/idun_agent_engine/core/__init__.py +11 -0
  18. idun_agent_engine-0.3.7/src/idun_agent_engine/core/app_factory.py +73 -0
  19. idun_agent_engine-0.3.7/src/idun_agent_engine/core/config_builder.py +663 -0
  20. idun_agent_engine-0.3.7/src/idun_agent_engine/core/engine_config.py +21 -0
  21. idun_agent_engine-0.3.7/src/idun_agent_engine/core/server_runner.py +145 -0
  22. idun_agent_engine-0.3.7/src/idun_agent_engine/guardrails/__init__.py +0 -0
  23. idun_agent_engine-0.3.7/src/idun_agent_engine/guardrails/base.py +24 -0
  24. idun_agent_engine-0.3.7/src/idun_agent_engine/guardrails/guardrails_hub/__init__.py +0 -0
  25. idun_agent_engine-0.3.7/src/idun_agent_engine/guardrails/guardrails_hub/guardrails_hub.py +106 -0
  26. idun_agent_engine-0.3.7/src/idun_agent_engine/guardrails/guardrails_hub/utils.py +1 -0
  27. idun_agent_engine-0.3.7/src/idun_agent_engine/mcp/__init__.py +5 -0
  28. idun_agent_engine-0.3.7/src/idun_agent_engine/mcp/helpers.py +97 -0
  29. idun_agent_engine-0.3.7/src/idun_agent_engine/mcp/registry.py +109 -0
  30. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/__init__.py +17 -0
  31. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/base.py +172 -0
  32. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/gcp_logging/__init__.py +0 -0
  33. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/gcp_logging/gcp_logging_handler.py +52 -0
  34. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/gcp_trace/__init__.py +0 -0
  35. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/gcp_trace/gcp_trace_handler.py +116 -0
  36. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/langfuse/__init__.py +5 -0
  37. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/langfuse/langfuse_handler.py +79 -0
  38. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/phoenix/__init__.py +5 -0
  39. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/phoenix/phoenix_handler.py +65 -0
  40. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/phoenix_local/__init__.py +5 -0
  41. idun_agent_engine-0.3.7/src/idun_agent_engine/observability/phoenix_local/phoenix_local_handler.py +123 -0
  42. idun_agent_engine-0.3.7/src/idun_agent_engine/py.typed +0 -0
  43. idun_agent_engine-0.3.7/src/idun_agent_engine/server/__init__.py +5 -0
  44. idun_agent_engine-0.3.7/src/idun_agent_engine/server/dependencies.py +52 -0
  45. idun_agent_engine-0.3.7/src/idun_agent_engine/server/lifespan.py +106 -0
  46. idun_agent_engine-0.3.7/src/idun_agent_engine/server/routers/__init__.py +5 -0
  47. idun_agent_engine-0.3.7/src/idun_agent_engine/server/routers/agent.py +210 -0
  48. idun_agent_engine-0.3.7/src/idun_agent_engine/server/routers/agui.py +47 -0
  49. idun_agent_engine-0.3.7/src/idun_agent_engine/server/routers/base.py +114 -0
  50. idun_agent_engine-0.3.7/src/idun_agent_engine/server/server_config.py +8 -0
  51. idun_agent_engine-0.3.7/src/idun_agent_engine/templates/__init__.py +1 -0
  52. idun_agent_engine-0.3.7/src/idun_agent_engine/templates/correction.py +65 -0
  53. idun_agent_engine-0.3.7/src/idun_agent_engine/templates/deep_research.py +40 -0
  54. idun_agent_engine-0.3.7/src/idun_agent_engine/templates/translation.py +70 -0
  55. idun_agent_engine-0.3.7/src/idun_platform_cli/__init__.py +0 -0
  56. idun_agent_engine-0.3.7/src/idun_platform_cli/groups/__init__.py +0 -0
  57. idun_agent_engine-0.3.7/src/idun_platform_cli/groups/agent/__init__.py +0 -0
  58. idun_agent_engine-0.3.7/src/idun_platform_cli/groups/agent/main.py +16 -0
  59. idun_agent_engine-0.3.7/src/idun_platform_cli/groups/agent/package.py +70 -0
  60. idun_agent_engine-0.3.7/src/idun_platform_cli/groups/agent/serve.py +107 -0
  61. idun_agent_engine-0.3.7/src/idun_platform_cli/main.py +14 -0
@@ -0,0 +1,207 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ .python-version
7
+ # C extensions
8
+ *.so
9
+ .DS_Store
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # UV
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ #uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ #poetry.lock
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ #pdm.lock
114
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
115
+ # in version control.
116
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
117
+ .pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
122
+ __pypackages__/
123
+
124
+ # Celery stuff
125
+ celerybeat-schedule
126
+ celerybeat.pid
127
+
128
+ # SageMath parsed files
129
+ *.sage.py
130
+
131
+ # Environments
132
+ .env
133
+ .venv
134
+ env/
135
+ venv/
136
+ ENV/
137
+ env.bak/
138
+ venv.bak/
139
+
140
+ # Spyder project settings
141
+ .spyderproject
142
+ .spyproject
143
+
144
+ # Rope project settings
145
+ .ropeproject
146
+
147
+ # mkdocs documentation
148
+ /site
149
+
150
+ # mypy
151
+ .mypy_cache/
152
+ .dmypy.json
153
+ dmypy.json
154
+
155
+ # Pyre type checker
156
+ .pyre/
157
+
158
+ # pytype static type analyzer
159
+ .pytype/
160
+
161
+ # Cython debug symbols
162
+ cython_debug/
163
+
164
+ # PyCharm
165
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
166
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
167
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
168
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
169
+ #.idea/
170
+
171
+ # Ruff stuff:
172
+ .ruff_cache/
173
+
174
+ # PyPI configuration file
175
+ .pypirc
176
+
177
+ # Database files
178
+ *.db
179
+ *.db-shm
180
+ *.db-wai
181
+ *.db-journal*
182
+ *.sqlite
183
+ *.sqlite3
184
+ agents.db
185
+ checkpoint_async.db
186
+
187
+ # Python virtual environment
188
+ .venv/
189
+ venv/
190
+ ENV/
191
+
192
+ # Python cache
193
+ __pycache__/
194
+ *.pyc
195
+ *.pyo
196
+ *.pyd
197
+
198
+ # Poetry
199
+ poetry.lock
200
+
201
+ # Environment variables
202
+ .env
203
+
204
+ # Custom Gitignore for Idun
205
+ *.db-wal
206
+ .DS_Store
207
+ *.DS_Store
@@ -0,0 +1,335 @@
1
+ Metadata-Version: 2.4
2
+ Name: idun-agent-engine
3
+ Version: 0.3.7
4
+ Summary: Python SDK and runtime to serve AI agents with FastAPI, LangGraph, and observability.
5
+ Project-URL: Homepage, https://github.com/geoffreyharrazi/idun-agent-platform
6
+ Project-URL: Repository, https://github.com/geoffreyharrazi/idun-agent-platform
7
+ Project-URL: Documentation, https://github.com/geoffreyharrazi/idun-agent-platform/tree/main/libs/idun_agent_engine
8
+ Project-URL: Issues, https://github.com/geoffreyharrazi/idun-agent-platform/issues
9
+ Author-email: Geoffrey HARRAZI <geoffreyharrazi@gmail.com>
10
+ License-Expression: MIT
11
+ Keywords: agents,fastapi,langgraph,llm,observability,sdk
12
+ Classifier: Framework :: FastAPI
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Libraries
20
+ Classifier: Typing :: Typed
21
+ Requires-Python: <3.14,>=3.12
22
+ Requires-Dist: ag-ui-adk<0.4.0,>=0.3.4
23
+ Requires-Dist: ag-ui-langgraph<0.1.0,>=0.0.20
24
+ Requires-Dist: ag-ui-protocol<0.2.0,>=0.1.8
25
+ Requires-Dist: aiosqlite<0.22.0,>=0.21.0
26
+ Requires-Dist: arize-phoenix-otel<1.0.0,>=0.2.0
27
+ Requires-Dist: arize-phoenix<12.0.0,>=11.22.0
28
+ Requires-Dist: click>=8.2.0
29
+ Requires-Dist: copilotkit<0.2.0,>=0.1.72
30
+ Requires-Dist: deepagents<1.0.0,>=0.2.8
31
+ Requires-Dist: fastapi<0.116.0,>=0.115.0
32
+ Requires-Dist: google-adk<2.0.0,>=1.19.0
33
+ Requires-Dist: google-cloud-logging<4.0.0,>=3.10.0
34
+ Requires-Dist: guardrails-ai<0.8.0,>=0.7.0
35
+ Requires-Dist: httpx<0.29.0,>=0.28.1
36
+ Requires-Dist: idun-agent-schema<1.0.0,>=0.3.6
37
+ Requires-Dist: langchain-core<2.0.0,>=1.0.0
38
+ Requires-Dist: langchain-google-vertexai<4.0.0,>=2.0.27
39
+ Requires-Dist: langchain-mcp-adapters<0.2.0,>=0.1.0
40
+ Requires-Dist: langchain<2.0.0,>=1.0.0
41
+ Requires-Dist: langfuse-haystack>=2.3.0
42
+ Requires-Dist: langfuse<4.0.0,>=2.60.8
43
+ Requires-Dist: langgraph-checkpoint-postgres<4.0.0,>=3.0.0
44
+ Requires-Dist: langgraph-checkpoint-sqlite<4.0.0,>=3.0.0
45
+ Requires-Dist: langgraph<2.0.0,>=1.0.0
46
+ Requires-Dist: mcp<2.0.0,>=1.0.0
47
+ Requires-Dist: openinference-instrumentation-google-adk<1.0.0,>=0.1.0
48
+ Requires-Dist: openinference-instrumentation-guardrails<1.0.0,>=0.1.0
49
+ Requires-Dist: openinference-instrumentation-langchain<1.0.0,>=0.1.13
50
+ Requires-Dist: openinference-instrumentation-mcp<2.0.0,>=1.0.0
51
+ Requires-Dist: openinference-instrumentation-vertexai<1.0.0,>=0.1.0
52
+ Requires-Dist: opentelemetry-exporter-gcp-trace<2.0.0,>=1.6.0
53
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.22.0
54
+ Requires-Dist: pydantic<3.0.0,>=2.11.7
55
+ Requires-Dist: python-dotenv>=1.1.1
56
+ Requires-Dist: sqlalchemy<3.0.0,>=2.0.36
57
+ Requires-Dist: streamlit<2.0.0,>=1.47.1
58
+ Requires-Dist: tavily-python<0.8.0,>=0.7.9
59
+ Requires-Dist: uvicorn<0.36.0,>=0.35.0
60
+ Description-Content-Type: text/markdown
61
+
62
+ # Idun Agent Engine
63
+
64
+ Turn any LangGraph-based agent into a production-grade API in minutes.
65
+
66
+ Idun Agent Engine is a lightweight runtime and SDK that wraps your agent with a FastAPI server, adds streaming, structured responses, config validation, and optional observability — with zero boilerplate. Use a YAML file or a fluent builder to configure and run.
67
+
68
+ ## Installation
69
+
70
+ ```bash
71
+ pip install idun-agent-engine
72
+ ```
73
+
74
+ - Requires Python 3.13
75
+ - Ships with FastAPI, Uvicorn, LangGraph, SQLite checkpointing, and optional observability hooks
76
+
77
+ ## Quickstart
78
+
79
+ ### 1) Minimal one-liner (from a YAML config)
80
+
81
+ ```python
82
+ from idun_agent_engine.core.server_runner import run_server_from_config
83
+
84
+ run_server_from_config("config.yaml")
85
+ ```
86
+
87
+ Example `config.yaml`:
88
+
89
+ ```yaml
90
+ server:
91
+ api:
92
+ port: 8000
93
+
94
+ agent:
95
+ type: "langgraph"
96
+ config:
97
+ name: "My Example LangGraph Agent"
98
+ graph_definition: "./examples/01_basic_config_file/example_agent.py:app"
99
+ # Optional: conversation persistence
100
+ checkpointer:
101
+ type: "sqlite"
102
+ db_url: "sqlite:///example_checkpoint.db"
103
+ # Optional: provider-agnostic observability
104
+ observability:
105
+ provider: langfuse # or phoenix
106
+ enabled: true
107
+ options:
108
+ host: ${LANGFUSE_HOST}
109
+ public_key: ${LANGFUSE_PUBLIC_KEY}
110
+ secret_key: ${LANGFUSE_SECRET_KEY}
111
+ run_name: "idun-langgraph-run"
112
+ ```
113
+
114
+ Run and open docs at `http://localhost:8000/docs`.
115
+
116
+ ### 2) Programmatic setup with the fluent builder
117
+
118
+ ```python
119
+ from pathlib import Path
120
+ from idun_agent_engine import ConfigBuilder, create_app, run_server
121
+
122
+ config = (
123
+ ConfigBuilder()
124
+ .with_api_port(8000)
125
+ .with_langgraph_agent(
126
+ name="Programmatic Example Agent",
127
+ graph_definition=str(Path("./examples/02_programmatic_config/smart_agent.py:app")),
128
+ sqlite_checkpointer="programmatic_example.db",
129
+ )
130
+ .build()
131
+ )
132
+
133
+ app = create_app(engine_config=config)
134
+ run_server(app, reload=True)
135
+ ```
136
+
137
+ ## Endpoints
138
+
139
+ All servers expose these by default:
140
+
141
+ - POST `/agent/invoke`: single request/response
142
+ - POST `/agent/stream`: server-sent events stream of `ag-ui` protocol events
143
+ - GET `/health`: service health with engine version
144
+ - GET `/`: root landing with links
145
+
146
+ Invoke example:
147
+
148
+ ```bash
149
+ curl -X POST "http://localhost:8000/agent/invoke" \
150
+ -H "Content-Type: application/json" \
151
+ -d '{"query": "Hello!", "session_id": "user-123"}'
152
+ ```
153
+
154
+ Stream example:
155
+
156
+ ```bash
157
+ curl -N -X POST "http://localhost:8000/agent/stream" \
158
+ -H "Content-Type: application/json" \
159
+ -d '{"query": "Tell me a story", "session_id": "user-123"}'
160
+ ```
161
+
162
+ ## LangGraph integration
163
+
164
+ Point the engine to a `StateGraph` variable in your file using `graph_definition`:
165
+
166
+ ```python
167
+ # examples/01_basic_config_file/example_agent.py
168
+ import operator
169
+ from typing import Annotated, TypedDict
170
+ from langgraph.graph import END, StateGraph
171
+
172
+ class AgentState(TypedDict):
173
+ messages: Annotated[list, operator.add]
174
+
175
+ def greeting_node(state):
176
+ user_message = state["messages"][-1] if state["messages"] else ""
177
+ return {"messages": [("ai", f"Hello! You said: '{user_message}'")]}
178
+
179
+ graph = StateGraph(AgentState)
180
+ graph.add_node("greet", greeting_node)
181
+ graph.set_entry_point("greet")
182
+ graph.add_edge("greet", END)
183
+
184
+ # This variable name is referenced by graph_definition
185
+ app = graph
186
+ ```
187
+
188
+ Then reference it in config:
189
+
190
+ ```yaml
191
+ agent:
192
+ type: "langgraph"
193
+ config:
194
+ graph_definition: "./examples/01_basic_config_file/example_agent.py:app"
195
+ ```
196
+
197
+ Behind the scenes, the engine:
198
+
199
+ - Validates config with Pydantic models
200
+ - Loads your `StateGraph` from disk
201
+ - Optionally wires a SQLite checkpointer via `langgraph.checkpoint.sqlite`
202
+ - Exposes `invoke` and `stream` endpoints
203
+ - Bridges LangGraph events to `ag-ui` stream events
204
+
205
+ ## Observability (optional)
206
+
207
+ Enable provider-agnostic observability via the `observability` block in your agent config. Today supports Langfuse and Arize Phoenix (OpenInference) patterns; more coming soon.
208
+
209
+ ```yaml
210
+ agent:
211
+ type: "langgraph"
212
+ config:
213
+ observability:
214
+ provider: langfuse # or phoenix
215
+ enabled: true
216
+ options:
217
+ host: ${LANGFUSE_HOST}
218
+ public_key: ${LANGFUSE_PUBLIC_KEY}
219
+ secret_key: ${LANGFUSE_SECRET_KEY}
220
+ run_name: "idun-langgraph-run"
221
+ ```
222
+
223
+ ## Configuration reference
224
+
225
+ - `server.api.port` (int): HTTP port (default 8000)
226
+ - `agent.type` (enum): currently `langgraph` (CrewAI placeholder exists but not implemented)
227
+ - `agent.config.name` (str): human-readable name
228
+ - `agent.config.graph_definition` (str): absolute or relative `path/to/file.py:variable`
229
+ - `agent.config.checkpointer` (sqlite): `{ type: "sqlite", db_url: "sqlite:///file.db" }`
230
+ - `agent.config.observability` (optional): provider options as shown above
231
+ - `mcp_servers` (list, optional): collection of MCP servers that should be available to your agent runtime. Each entry matches the fields supported by `langchain-mcp-adapters` (name, transport, url/command, headers, etc.).
232
+
233
+ Config can be sourced by:
234
+
235
+ - `engine_config` (preferred): pass a validated `EngineConfig` to `create_app`
236
+ - `config_dict`: dict validated at runtime
237
+ - `config_path`: path to YAML; defaults to `config.yaml`
238
+
239
+ ### MCP Servers
240
+
241
+ You can mount MCP servers directly in your engine config. The engine will automatically
242
+ create a `MultiServerMCPClient` and expose it on `app.state.mcp_registry`.
243
+
244
+ ```yaml
245
+ mcp_servers:
246
+ - name: "math"
247
+ transport: "stdio"
248
+ command: "python"
249
+ args:
250
+ - "/path/to/math_server.py"
251
+ - name: "weather"
252
+ transport: "streamable_http"
253
+ url: "http://localhost:8000/mcp"
254
+ ```
255
+
256
+ Inside your FastAPI dependencies or handlers:
257
+
258
+ ```python
259
+ from idun_agent_engine.server.dependencies import get_mcp_registry
260
+
261
+ @router.get("/mcp/{server}/tools")
262
+ async def list_tools(server: str, registry = Depends(get_mcp_registry)):
263
+ return await registry.get_tools(server)
264
+ ```
265
+
266
+ Or outside of FastAPI:
267
+
268
+ ```python
269
+ from langchain_mcp_adapters.tools import load_mcp_tools
270
+
271
+ registry = app.state.mcp_registry
272
+ async with registry.get_session("math") as session:
273
+ tools = await load_mcp_tools(session)
274
+ ```
275
+
276
+ ## Examples
277
+
278
+ The `examples/` folder contains complete projects:
279
+
280
+ - `01_basic_config_file`: YAML config + simple agent
281
+ - `02_programmatic_config`: `ConfigBuilder` usage and advanced flows
282
+ - `03_minimal_setup`: one-line server from config
283
+
284
+ Run any example with Python 3.13 installed.
285
+
286
+ ## CLI and runtime helpers
287
+
288
+ Top-level imports for convenience:
289
+
290
+ ```python
291
+ from idun_agent_engine import (
292
+ create_app,
293
+ run_server,
294
+ run_server_from_config,
295
+ run_server_from_builder,
296
+ ConfigBuilder,
297
+ )
298
+ ```
299
+
300
+ - `create_app(...)` builds the FastAPI app and registers routes
301
+ - `run_server(app, ...)` runs with Uvicorn
302
+ - `run_server_from_config(path, ...)` loads config, builds app, and runs
303
+ - `run_server_from_builder(builder, ...)` builds from a builder and runs
304
+
305
+ ## Production notes
306
+
307
+ - Use a process manager (e.g., multiple Uvicorn workers behind a gateway). Note: `reload=True` is for development and incompatible with multi-worker mode.
308
+ - Mount behind a reverse proxy and enable TLS where appropriate.
309
+ - Persist conversations using the SQLite checkpointer in production or replace with a custom checkpointer when available.
310
+
311
+ ## Roadmap
312
+
313
+ - CrewAI adapter (placeholder exists, not yet implemented)
314
+ - Additional stores and checkpointers
315
+ - First-class CLI for `idun` commands
316
+
317
+ ## Contributing
318
+
319
+ Issues and PRs are welcome. See the repository:
320
+
321
+ - Repo: `https://github.com/geoffreyharrazi/idun-agent-platform`
322
+ - Package path: `libs/idun_agent_engine`
323
+ - Open an issue: `https://github.com/geoffreyharrazi/idun-agent-platform/issues`
324
+
325
+ Run locally:
326
+
327
+ ```bash
328
+ cd libs/idun_agent_engine
329
+ poetry install
330
+ poetry run pytest -q
331
+ ```
332
+
333
+ ## License
334
+
335
+ MIT — see `LICENSE` in the repo root.