agentkernel 0.2.2__tar.gz → 0.2.4__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.
- agentkernel-0.2.2/README.md → agentkernel-0.2.4/PKG-INFO +175 -32
- agentkernel-0.2.2/PKG-INFO → agentkernel-0.2.4/README.md +119 -75
- {agentkernel-0.2.2 → agentkernel-0.2.4}/pyproject.toml +26 -12
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/a2a/a2a.py +8 -6
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/adk/__init__.py +1 -1
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/adk/adk.py +30 -42
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/api/__init__.py +2 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/api/a2a.py +4 -6
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/api/agent.py +27 -21
- agentkernel-0.2.4/src/agentkernel/api/rest_request_handler.py +26 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/api/restapi.py +16 -8
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/aws/aklambda.py +35 -16
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/cli/__init__.py +1 -0
- agentkernel-0.2.4/src/agentkernel/cli/cli.py +109 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/__init__.py +4 -3
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/base.py +6 -5
- agentkernel-0.2.4/src/agentkernel/core/builder.py +84 -0
- agentkernel-0.2.4/src/agentkernel/core/config.py +93 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/module.py +3 -3
- agentkernel-0.2.4/src/agentkernel/core/runtime.py +204 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/service.py +2 -2
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/sessions/__init__.py +2 -1
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/sessions/base.py +1 -1
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/sessions/redis.py +5 -8
- agentkernel-0.2.4/src/agentkernel/core/util/config_yaml_util.py +173 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/crewai/crewai.py +26 -24
- agentkernel-0.2.4/src/agentkernel/integrations/__init__.py +12 -0
- agentkernel-0.2.4/src/agentkernel/integrations/slack/README.md +60 -0
- agentkernel-0.2.4/src/agentkernel/integrations/slack/__init__.py +14 -0
- agentkernel-0.2.4/src/agentkernel/integrations/slack/slack_chat.py +160 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/langgraph/langgraph.py +80 -76
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/mcp/__init__.py +1 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/mcp/akmcp.py +6 -5
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/openai/openai.py +17 -15
- agentkernel-0.2.4/src/agentkernel/slack.py +8 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/test/test.py +7 -6
- agentkernel-0.2.4/src/agentkernel/trace/__init__.py +8 -0
- agentkernel-0.2.4/src/agentkernel/trace/base.py +40 -0
- agentkernel-0.2.4/src/agentkernel/trace/langfuse/__init__.py +0 -0
- agentkernel-0.2.4/src/agentkernel/trace/langfuse/adk.py +35 -0
- agentkernel-0.2.4/src/agentkernel/trace/langfuse/crewai.py +37 -0
- agentkernel-0.2.4/src/agentkernel/trace/langfuse/langfuse.py +60 -0
- agentkernel-0.2.4/src/agentkernel/trace/langfuse/langgraph.py +46 -0
- agentkernel-0.2.4/src/agentkernel/trace/langfuse/openai.py +35 -0
- agentkernel-0.2.4/src/agentkernel/trace/openllmetry/__init__.py +0 -0
- agentkernel-0.2.4/src/agentkernel/trace/openllmetry/adk.py +29 -0
- agentkernel-0.2.4/src/agentkernel/trace/openllmetry/crewai.py +29 -0
- agentkernel-0.2.4/src/agentkernel/trace/openllmetry/langgraph.py +29 -0
- agentkernel-0.2.4/src/agentkernel/trace/openllmetry/openai.py +29 -0
- agentkernel-0.2.4/src/agentkernel/trace/openllmetry/openllmetry.py +133 -0
- agentkernel-0.2.4/src/agentkernel/trace/trace.py +86 -0
- agentkernel-0.2.2/src/agentkernel/cli/cli.py +0 -103
- agentkernel-0.2.2/src/agentkernel/core/config.py +0 -171
- agentkernel-0.2.2/src/agentkernel/core/runtime.py +0 -110
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/__init__.py +0 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/a2a/__init__.py +0 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/aws/__init__.py +0 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/sessions/in_memory.py +1 -1
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/crewai/__init__.py +0 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/langgraph/__init__.py +0 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/openai/__init__.py +0 -0
- {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/test/__init__.py +0 -0
|
@@ -1,3 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: agentkernel
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Summary: Agent Kernel - Unified AI Agents Runtime
|
|
5
|
+
Author: Yaala Labs
|
|
6
|
+
Author-email: Yaala Labs <agentkernel@yaalalabs.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Requires-Dist: deprecated>=1.3.1
|
|
9
|
+
Requires-Dist: pydantic>=2.11.7
|
|
10
|
+
Requires-Dist: pydantic-settings>=2.10.1
|
|
11
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
12
|
+
Requires-Dist: singleton-type>=0.0.5
|
|
13
|
+
Requires-Dist: redis>=6.4.0
|
|
14
|
+
Requires-Dist: a2a-sdk[http-server]>=0.3.6 ; extra == 'a2a'
|
|
15
|
+
Requires-Dist: google-adk>=1.14.1 ; extra == 'adk'
|
|
16
|
+
Requires-Dist: litellm~=1.74.3 ; extra == 'adk'
|
|
17
|
+
Requires-Dist: openinference-instrumentation-google-adk>=0.1.6 ; extra == 'adk'
|
|
18
|
+
Requires-Dist: fastapi>=0.118.0 ; extra == 'api'
|
|
19
|
+
Requires-Dist: uvicorn>=0.37.0 ; extra == 'api'
|
|
20
|
+
Requires-Dist: gunicorn>=23.0.0 ; extra == 'api'
|
|
21
|
+
Requires-Dist: crewai>=0.150.0 ; extra == 'crewai'
|
|
22
|
+
Requires-Dist: openinference-instrumentation-crewai>=0.1.16 ; extra == 'crewai'
|
|
23
|
+
Requires-Dist: openinference-instrumentation-litellm>=0.1.28 ; extra == 'crewai'
|
|
24
|
+
Requires-Dist: langfuse>=3.9.2 ; extra == 'langfuse'
|
|
25
|
+
Requires-Dist: nest-asyncio>=1.6.0 ; extra == 'langfuse'
|
|
26
|
+
Requires-Dist: langgraph~=0.6.2 ; extra == 'langgraph'
|
|
27
|
+
Requires-Dist: langchain~=0.3.27 ; extra == 'langgraph'
|
|
28
|
+
Requires-Dist: langchain-community~=0.3.27 ; extra == 'langgraph'
|
|
29
|
+
Requires-Dist: litellm~=1.74.3 ; extra == 'langgraph'
|
|
30
|
+
Requires-Dist: fastmcp>=2.12.4 ; extra == 'mcp'
|
|
31
|
+
Requires-Dist: openai-agents>=0.2.3 ; extra == 'openai'
|
|
32
|
+
Requires-Dist: openinference-instrumentation-openai-agents>=1.3.0 ; extra == 'openai'
|
|
33
|
+
Requires-Dist: traceloop-sdk>=0.48.0 ; extra == 'openllmetry'
|
|
34
|
+
Requires-Dist: slack-bolt==1.22.0 ; extra == 'slack'
|
|
35
|
+
Requires-Dist: pytest>=8.4.1 ; extra == 'test'
|
|
36
|
+
Requires-Dist: pytest-asyncio>=1.2.0 ; extra == 'test'
|
|
37
|
+
Requires-Dist: pytest-cov>=6.2.1 ; extra == 'test'
|
|
38
|
+
Requires-Dist: pytest-html>=4.1.1 ; extra == 'test'
|
|
39
|
+
Requires-Dist: pytest-order>=1.3.0 ; extra == 'test'
|
|
40
|
+
Requires-Dist: rapidfuzz>=3.14.1 ; extra == 'test'
|
|
41
|
+
Requires-Python: >=3.12
|
|
42
|
+
Provides-Extra: a2a
|
|
43
|
+
Provides-Extra: adk
|
|
44
|
+
Provides-Extra: api
|
|
45
|
+
Provides-Extra: aws
|
|
46
|
+
Provides-Extra: cli
|
|
47
|
+
Provides-Extra: crewai
|
|
48
|
+
Provides-Extra: langfuse
|
|
49
|
+
Provides-Extra: langgraph
|
|
50
|
+
Provides-Extra: mcp
|
|
51
|
+
Provides-Extra: openai
|
|
52
|
+
Provides-Extra: openllmetry
|
|
53
|
+
Provides-Extra: slack
|
|
54
|
+
Provides-Extra: test
|
|
55
|
+
Description-Content-Type: text/markdown
|
|
56
|
+
|
|
1
57
|
# Agent Kernel
|
|
2
58
|
|
|
3
59
|
[](https://badge.fury.io/py/agentkernel)
|
|
@@ -236,7 +292,7 @@ Configure where agent sessions are stored.
|
|
|
236
292
|
- **Type**: string
|
|
237
293
|
- **Options**: `in_memory`, `redis`
|
|
238
294
|
- **Default**: `in_memory`
|
|
239
|
-
- **Environment Variable**: `
|
|
295
|
+
- **Environment Variable**: `AK_SESSION__TYPE`
|
|
240
296
|
|
|
241
297
|
##### Redis Configuration
|
|
242
298
|
|
|
@@ -246,19 +302,19 @@ Required when `session.type=redis`:
|
|
|
246
302
|
- **Field**: `session.redis.url`
|
|
247
303
|
- **Default**: `redis://localhost:6379`
|
|
248
304
|
- **Description**: Redis connection URL. Use `rediss://` for SSL
|
|
249
|
-
- **Environment Variable**: `
|
|
305
|
+
- **Environment Variable**: `AK_SESSION__REDIS__URL`
|
|
250
306
|
|
|
251
307
|
- **TTL (Time to Live)**
|
|
252
308
|
- **Field**: `session.redis.ttl`
|
|
253
309
|
- **Default**: `604800` (7 days)
|
|
254
310
|
- **Description**: Session TTL in seconds
|
|
255
|
-
- **Environment Variable**: `
|
|
311
|
+
- **Environment Variable**: `AK_SESSION__REDIS__TTL`
|
|
256
312
|
|
|
257
313
|
- **Key Prefix**
|
|
258
314
|
- **Field**: `session.redis.prefix`
|
|
259
315
|
- **Default**: `ak:sessions:`
|
|
260
316
|
- **Description**: Key prefix for session storage
|
|
261
|
-
- **Environment Variable**: `
|
|
317
|
+
- **Environment Variable**: `AK_SESSION__REDIS__PREFIX`
|
|
262
318
|
|
|
263
319
|
#### API Configuration
|
|
264
320
|
|
|
@@ -267,71 +323,135 @@ Configure the REST API server (if using the API module).
|
|
|
267
323
|
- **Host**
|
|
268
324
|
- **Field**: `api.host`
|
|
269
325
|
- **Default**: `0.0.0.0`
|
|
270
|
-
- **Environment Variable**: `
|
|
326
|
+
- **Environment Variable**: `AK_API__HOST`
|
|
271
327
|
|
|
272
328
|
- **Port**
|
|
273
329
|
- **Field**: `api.port`
|
|
274
330
|
- **Default**: `8000`
|
|
275
|
-
- **Environment Variable**: `
|
|
331
|
+
- **Environment Variable**: `AK_API__PORT`
|
|
276
332
|
|
|
277
333
|
- **Custom Router Prefix**
|
|
278
334
|
- **Field**: `api.custom_router_prefix`
|
|
279
335
|
- **Default**: `/custom`
|
|
280
|
-
- **Environment Variable**: `
|
|
336
|
+
- **Environment Variable**: `AK_API__CUSTOM_ROUTER_PREFIX`
|
|
281
337
|
|
|
282
338
|
- **Enabled Routes**
|
|
283
339
|
- **Field**: `api.enabled_routes.agents`
|
|
284
340
|
- **Default**: `true`
|
|
285
341
|
- **Description**: Enable agent interaction routes
|
|
286
|
-
- **Environment Variable**: `
|
|
342
|
+
- **Environment Variable**: `AK_API__ENABLED_ROUTES__AGENTS`
|
|
287
343
|
|
|
288
344
|
#### A2A (Agent-to-Agent) Configuration
|
|
289
345
|
|
|
290
346
|
- **Enabled**
|
|
291
347
|
- **Field**: `a2a.enabled`
|
|
292
348
|
- **Default**: `false`
|
|
293
|
-
- **Environment Variable**: `
|
|
349
|
+
- **Environment Variable**: `AK_A2A__ENABLED`
|
|
294
350
|
|
|
295
351
|
- **Agents**
|
|
296
352
|
- **Field**: `a2a.agents`
|
|
297
353
|
- **Default**: `["*"]`
|
|
298
354
|
- **Description**: List of agent names to enable A2A (use `["*"]` for all)
|
|
299
|
-
- **Environment Variable**: `
|
|
355
|
+
- **Environment Variable**: `AK_A2A__AGENTS` (comma-separated)
|
|
300
356
|
|
|
301
357
|
- **URL**
|
|
302
358
|
- **Field**: `a2a.url`
|
|
303
359
|
- **Default**: `http://localhost:8000/a2a`
|
|
304
|
-
- **Environment Variable**: `
|
|
360
|
+
- **Environment Variable**: `AK_A2A__URL`
|
|
305
361
|
|
|
306
362
|
- **Task Store Type**
|
|
307
363
|
- **Field**: `a2a.task_store_type`
|
|
308
364
|
- **Options**: `in_memory`, `redis`
|
|
309
365
|
- **Default**: `in_memory`
|
|
310
|
-
- **Environment Variable**: `
|
|
366
|
+
- **Environment Variable**: `AK_A2A__TASK_STORE_TYPE`
|
|
311
367
|
|
|
312
368
|
#### MCP (Model Context Protocol) Configuration
|
|
313
369
|
|
|
314
370
|
- **Enabled**
|
|
315
371
|
- **Field**: `mcp.enabled`
|
|
316
372
|
- **Default**: `false`
|
|
317
|
-
- **Environment Variable**: `
|
|
373
|
+
- **Environment Variable**: `AK_MCP__ENABLED`
|
|
318
374
|
|
|
319
375
|
- **Expose Agents**
|
|
320
376
|
- **Field**: `mcp.expose_agents`
|
|
321
377
|
- **Default**: `false`
|
|
322
378
|
- **Description**: Expose agents as MCP tools
|
|
323
|
-
- **Environment Variable**: `
|
|
379
|
+
- **Environment Variable**: `AK_MCP__EXPOSE_AGENTS`
|
|
324
380
|
|
|
325
381
|
- **Agents**
|
|
326
382
|
- **Field**: `mcp.agents`
|
|
327
383
|
- **Default**: `["*"]`
|
|
328
384
|
- **Description**: List of agent names to expose as MCP tools
|
|
329
|
-
- **Environment Variable**: `
|
|
385
|
+
- **Environment Variable**: `AK_MCP__AGENTS` (comma-separated)
|
|
330
386
|
|
|
331
387
|
- **URL**
|
|
332
388
|
- **Field**: `mcp.url`
|
|
333
389
|
- **Default**: `http://localhost:8000/mcp`
|
|
334
|
-
- **Environment Variable**: `
|
|
390
|
+
- **Environment Variable**: `AK_MCP__URL`
|
|
391
|
+
|
|
392
|
+
#### Trace (Observability) Configuration
|
|
393
|
+
|
|
394
|
+
Configure tracing and observability for monitoring agent execution.
|
|
395
|
+
|
|
396
|
+
- **Enabled**
|
|
397
|
+
- **Field**: `trace.enabled`
|
|
398
|
+
- **Default**: `false`
|
|
399
|
+
- **Description**: Enable tracing/observability
|
|
400
|
+
- **Environment Variable**: `AK_TRACE__ENABLED`
|
|
401
|
+
|
|
402
|
+
- **Type**
|
|
403
|
+
- **Field**: `trace.type`
|
|
404
|
+
- **Options**: `langfuse`, `openllmetry`
|
|
405
|
+
- **Default**: `langfuse`
|
|
406
|
+
- **Description**: Type of tracing provider to use
|
|
407
|
+
- **Environment Variable**: `AK_TRACE__TYPE`
|
|
408
|
+
|
|
409
|
+
**Langfuse Setup:**
|
|
410
|
+
|
|
411
|
+
To use Langfuse for tracing, install the langfuse extra:
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
pip install agentkernel[langfuse]
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Configure Langfuse credentials via environment variables:
|
|
418
|
+
|
|
419
|
+
```bash
|
|
420
|
+
export LANGFUSE_PUBLIC_KEY=pk-lf-...
|
|
421
|
+
export LANGFUSE_SECRET_KEY=sk-lf-...
|
|
422
|
+
export LANGFUSE_HOST=https://cloud.langfuse.com # or your self-hosted instance
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
Enable tracing in your configuration:
|
|
426
|
+
|
|
427
|
+
```yaml
|
|
428
|
+
trace:
|
|
429
|
+
enabled: true
|
|
430
|
+
type: langfuse
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
**OpenLLMetry (Traceloop) Setup:**
|
|
434
|
+
|
|
435
|
+
To use OpenLLMetry for tracing, install the openllmetry extra:
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
pip install agentkernel[openllmetry]
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Configure Traceloop credentials via environment variables:
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
export TRACELOOP_API_KEY=your-api-key
|
|
445
|
+
export TRACELOOP_BASE_URL=https://api.traceloop.com # Optional: for self-hosted
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
Enable tracing in your configuration:
|
|
449
|
+
|
|
450
|
+
```yaml
|
|
451
|
+
trace:
|
|
452
|
+
enabled: true
|
|
453
|
+
type: openllmetry
|
|
454
|
+
```
|
|
335
455
|
|
|
336
456
|
### Configuration Examples
|
|
337
457
|
|
|
@@ -341,14 +461,22 @@ Use the `AK_` prefix and underscores for nested fields:
|
|
|
341
461
|
|
|
342
462
|
```bash
|
|
343
463
|
export AK_DEBUG=true
|
|
344
|
-
export
|
|
345
|
-
export
|
|
346
|
-
export
|
|
347
|
-
export
|
|
348
|
-
export
|
|
349
|
-
export
|
|
350
|
-
export
|
|
351
|
-
export
|
|
464
|
+
export AK_SESSION__TYPE=redis
|
|
465
|
+
export AK_SESSION__REDIS__URL=redis://localhost:6379
|
|
466
|
+
export AK_SESSION__REDIS__TTL=604800
|
|
467
|
+
export AK_SESSION__REDIS__PREFIX=ak:sessions:
|
|
468
|
+
export AK_API__HOST=0.0.0.0
|
|
469
|
+
export AK_API__PORT=8000
|
|
470
|
+
export AK_A2A__ENABLED=true
|
|
471
|
+
export AK_MCP__ENABLED=false
|
|
472
|
+
export AK_TRACE__ENABLED=true
|
|
473
|
+
export AK_TRACE__TYPE=langfuse # or openllmetry
|
|
474
|
+
# For Langfuse:
|
|
475
|
+
# export LANGFUSE_PUBLIC_KEY=pk-lf-...
|
|
476
|
+
# export LANGFUSE_SECRET_KEY=sk-lf-...
|
|
477
|
+
# export LANGFUSE_HOST=https://cloud.langfuse.com
|
|
478
|
+
# For OpenLLMetry:
|
|
479
|
+
# export TRACELOOP_API_KEY=your-api-key
|
|
352
480
|
```
|
|
353
481
|
|
|
354
482
|
#### .env File
|
|
@@ -357,14 +485,22 @@ Create a `.env` file in your working directory:
|
|
|
357
485
|
|
|
358
486
|
```env
|
|
359
487
|
AK_DEBUG=false
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
488
|
+
AK_SESSION__TYPE=redis
|
|
489
|
+
AK_SESSION__REDIS__URL=rediss://my-redis:6379
|
|
490
|
+
AK_SESSION__REDIS__TTL=1209600
|
|
491
|
+
AK_SESSION__REDIS__PREFIX=ak:prod:sessions:
|
|
492
|
+
AK_API__HOST=0.0.0.0
|
|
493
|
+
AK_API__PORT=8080
|
|
494
|
+
AK_A2A__ENABLED=true
|
|
495
|
+
AK_A2A__URL=http://localhost:8080/a2a
|
|
496
|
+
AK_TRACE__ENABLED=true
|
|
497
|
+
AK_TRACE__TYPE=langfuse # or openllmetry
|
|
498
|
+
# Langfuse credentials (if using langfuse):
|
|
499
|
+
# LANGFUSE_PUBLIC_KEY=pk-lf-...
|
|
500
|
+
# LANGFUSE_SECRET_KEY=sk-lf-...
|
|
501
|
+
# LANGFUSE_HOST=https://cloud.langfuse.com
|
|
502
|
+
# OpenLLMetry credentials (if using openllmetry):
|
|
503
|
+
# TRACELOOP_API_KEY=your-api-key
|
|
368
504
|
```
|
|
369
505
|
|
|
370
506
|
#### config.yaml
|
|
@@ -392,6 +528,9 @@ mcp:
|
|
|
392
528
|
expose_agents: false
|
|
393
529
|
agents: ["*"]
|
|
394
530
|
url: http://localhost:8000/mcp
|
|
531
|
+
trace:
|
|
532
|
+
enabled: true
|
|
533
|
+
type: langfuse
|
|
395
534
|
```
|
|
396
535
|
|
|
397
536
|
#### config.json
|
|
@@ -425,6 +564,10 @@ mcp:
|
|
|
425
564
|
"expose_agents": false,
|
|
426
565
|
"agents": ["*"],
|
|
427
566
|
"url": "http://localhost:8000/mcp"
|
|
567
|
+
},
|
|
568
|
+
"trace": {
|
|
569
|
+
"enabled": true,
|
|
570
|
+
"type": "langfuse"
|
|
428
571
|
}
|
|
429
572
|
}
|
|
430
573
|
```
|
|
@@ -1,46 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: agentkernel
|
|
3
|
-
Version: 0.2.2
|
|
4
|
-
Summary: Agent Kernel - Unified AI Agents Runtime
|
|
5
|
-
Author: Yaala Labs
|
|
6
|
-
Author-email: Yaala Labs <info@yaalalabs.com>
|
|
7
|
-
License: MIT
|
|
8
|
-
Requires-Dist: pydantic>=2.11.7
|
|
9
|
-
Requires-Dist: pydantic-settings>=2.10.1
|
|
10
|
-
Requires-Dist: pyyaml>=6.0.2
|
|
11
|
-
Requires-Dist: redis>=6.4.0
|
|
12
|
-
Requires-Dist: a2a-sdk[http-server]>=0.3.6 ; extra == 'a2a'
|
|
13
|
-
Requires-Dist: google-adk>=1.14.1 ; extra == 'adk'
|
|
14
|
-
Requires-Dist: litellm~=1.74.3 ; extra == 'adk'
|
|
15
|
-
Requires-Dist: fastapi>=0.118.0 ; extra == 'api'
|
|
16
|
-
Requires-Dist: uvicorn>=0.37.0 ; extra == 'api'
|
|
17
|
-
Requires-Dist: gunicorn>=23.0.0 ; extra == 'api'
|
|
18
|
-
Requires-Dist: crewai>=0.150.0 ; extra == 'crewai'
|
|
19
|
-
Requires-Dist: langgraph~=0.6.2 ; extra == 'langgraph'
|
|
20
|
-
Requires-Dist: langchain~=0.3.27 ; extra == 'langgraph'
|
|
21
|
-
Requires-Dist: langchain-community~=0.3.27 ; extra == 'langgraph'
|
|
22
|
-
Requires-Dist: litellm~=1.74.3 ; extra == 'langgraph'
|
|
23
|
-
Requires-Dist: fastmcp>=2.12.4 ; extra == 'mcp'
|
|
24
|
-
Requires-Dist: openai-agents>=0.2.3 ; extra == 'openai'
|
|
25
|
-
Requires-Dist: pytest>=8.4.1 ; extra == 'test'
|
|
26
|
-
Requires-Dist: pytest-asyncio>=1.2.0 ; extra == 'test'
|
|
27
|
-
Requires-Dist: pytest-cov>=6.2.1 ; extra == 'test'
|
|
28
|
-
Requires-Dist: pytest-html>=4.1.1 ; extra == 'test'
|
|
29
|
-
Requires-Dist: pytest-order>=1.3.0 ; extra == 'test'
|
|
30
|
-
Requires-Dist: rapidfuzz>=3.14.1 ; extra == 'test'
|
|
31
|
-
Requires-Python: >=3.12
|
|
32
|
-
Provides-Extra: a2a
|
|
33
|
-
Provides-Extra: adk
|
|
34
|
-
Provides-Extra: api
|
|
35
|
-
Provides-Extra: aws
|
|
36
|
-
Provides-Extra: cli
|
|
37
|
-
Provides-Extra: crewai
|
|
38
|
-
Provides-Extra: langgraph
|
|
39
|
-
Provides-Extra: mcp
|
|
40
|
-
Provides-Extra: openai
|
|
41
|
-
Provides-Extra: test
|
|
42
|
-
Description-Content-Type: text/markdown
|
|
43
|
-
|
|
44
1
|
# Agent Kernel
|
|
45
2
|
|
|
46
3
|
[](https://badge.fury.io/py/agentkernel)
|
|
@@ -279,7 +236,7 @@ Configure where agent sessions are stored.
|
|
|
279
236
|
- **Type**: string
|
|
280
237
|
- **Options**: `in_memory`, `redis`
|
|
281
238
|
- **Default**: `in_memory`
|
|
282
|
-
- **Environment Variable**: `
|
|
239
|
+
- **Environment Variable**: `AK_SESSION__TYPE`
|
|
283
240
|
|
|
284
241
|
##### Redis Configuration
|
|
285
242
|
|
|
@@ -289,19 +246,19 @@ Required when `session.type=redis`:
|
|
|
289
246
|
- **Field**: `session.redis.url`
|
|
290
247
|
- **Default**: `redis://localhost:6379`
|
|
291
248
|
- **Description**: Redis connection URL. Use `rediss://` for SSL
|
|
292
|
-
- **Environment Variable**: `
|
|
249
|
+
- **Environment Variable**: `AK_SESSION__REDIS__URL`
|
|
293
250
|
|
|
294
251
|
- **TTL (Time to Live)**
|
|
295
252
|
- **Field**: `session.redis.ttl`
|
|
296
253
|
- **Default**: `604800` (7 days)
|
|
297
254
|
- **Description**: Session TTL in seconds
|
|
298
|
-
- **Environment Variable**: `
|
|
255
|
+
- **Environment Variable**: `AK_SESSION__REDIS__TTL`
|
|
299
256
|
|
|
300
257
|
- **Key Prefix**
|
|
301
258
|
- **Field**: `session.redis.prefix`
|
|
302
259
|
- **Default**: `ak:sessions:`
|
|
303
260
|
- **Description**: Key prefix for session storage
|
|
304
|
-
- **Environment Variable**: `
|
|
261
|
+
- **Environment Variable**: `AK_SESSION__REDIS__PREFIX`
|
|
305
262
|
|
|
306
263
|
#### API Configuration
|
|
307
264
|
|
|
@@ -310,71 +267,135 @@ Configure the REST API server (if using the API module).
|
|
|
310
267
|
- **Host**
|
|
311
268
|
- **Field**: `api.host`
|
|
312
269
|
- **Default**: `0.0.0.0`
|
|
313
|
-
- **Environment Variable**: `
|
|
270
|
+
- **Environment Variable**: `AK_API__HOST`
|
|
314
271
|
|
|
315
272
|
- **Port**
|
|
316
273
|
- **Field**: `api.port`
|
|
317
274
|
- **Default**: `8000`
|
|
318
|
-
- **Environment Variable**: `
|
|
275
|
+
- **Environment Variable**: `AK_API__PORT`
|
|
319
276
|
|
|
320
277
|
- **Custom Router Prefix**
|
|
321
278
|
- **Field**: `api.custom_router_prefix`
|
|
322
279
|
- **Default**: `/custom`
|
|
323
|
-
- **Environment Variable**: `
|
|
280
|
+
- **Environment Variable**: `AK_API__CUSTOM_ROUTER_PREFIX`
|
|
324
281
|
|
|
325
282
|
- **Enabled Routes**
|
|
326
283
|
- **Field**: `api.enabled_routes.agents`
|
|
327
284
|
- **Default**: `true`
|
|
328
285
|
- **Description**: Enable agent interaction routes
|
|
329
|
-
- **Environment Variable**: `
|
|
286
|
+
- **Environment Variable**: `AK_API__ENABLED_ROUTES__AGENTS`
|
|
330
287
|
|
|
331
288
|
#### A2A (Agent-to-Agent) Configuration
|
|
332
289
|
|
|
333
290
|
- **Enabled**
|
|
334
291
|
- **Field**: `a2a.enabled`
|
|
335
292
|
- **Default**: `false`
|
|
336
|
-
- **Environment Variable**: `
|
|
293
|
+
- **Environment Variable**: `AK_A2A__ENABLED`
|
|
337
294
|
|
|
338
295
|
- **Agents**
|
|
339
296
|
- **Field**: `a2a.agents`
|
|
340
297
|
- **Default**: `["*"]`
|
|
341
298
|
- **Description**: List of agent names to enable A2A (use `["*"]` for all)
|
|
342
|
-
- **Environment Variable**: `
|
|
299
|
+
- **Environment Variable**: `AK_A2A__AGENTS` (comma-separated)
|
|
343
300
|
|
|
344
301
|
- **URL**
|
|
345
302
|
- **Field**: `a2a.url`
|
|
346
303
|
- **Default**: `http://localhost:8000/a2a`
|
|
347
|
-
- **Environment Variable**: `
|
|
304
|
+
- **Environment Variable**: `AK_A2A__URL`
|
|
348
305
|
|
|
349
306
|
- **Task Store Type**
|
|
350
307
|
- **Field**: `a2a.task_store_type`
|
|
351
308
|
- **Options**: `in_memory`, `redis`
|
|
352
309
|
- **Default**: `in_memory`
|
|
353
|
-
- **Environment Variable**: `
|
|
310
|
+
- **Environment Variable**: `AK_A2A__TASK_STORE_TYPE`
|
|
354
311
|
|
|
355
312
|
#### MCP (Model Context Protocol) Configuration
|
|
356
313
|
|
|
357
314
|
- **Enabled**
|
|
358
315
|
- **Field**: `mcp.enabled`
|
|
359
316
|
- **Default**: `false`
|
|
360
|
-
- **Environment Variable**: `
|
|
317
|
+
- **Environment Variable**: `AK_MCP__ENABLED`
|
|
361
318
|
|
|
362
319
|
- **Expose Agents**
|
|
363
320
|
- **Field**: `mcp.expose_agents`
|
|
364
321
|
- **Default**: `false`
|
|
365
322
|
- **Description**: Expose agents as MCP tools
|
|
366
|
-
- **Environment Variable**: `
|
|
323
|
+
- **Environment Variable**: `AK_MCP__EXPOSE_AGENTS`
|
|
367
324
|
|
|
368
325
|
- **Agents**
|
|
369
326
|
- **Field**: `mcp.agents`
|
|
370
327
|
- **Default**: `["*"]`
|
|
371
328
|
- **Description**: List of agent names to expose as MCP tools
|
|
372
|
-
- **Environment Variable**: `
|
|
329
|
+
- **Environment Variable**: `AK_MCP__AGENTS` (comma-separated)
|
|
373
330
|
|
|
374
331
|
- **URL**
|
|
375
332
|
- **Field**: `mcp.url`
|
|
376
333
|
- **Default**: `http://localhost:8000/mcp`
|
|
377
|
-
- **Environment Variable**: `
|
|
334
|
+
- **Environment Variable**: `AK_MCP__URL`
|
|
335
|
+
|
|
336
|
+
#### Trace (Observability) Configuration
|
|
337
|
+
|
|
338
|
+
Configure tracing and observability for monitoring agent execution.
|
|
339
|
+
|
|
340
|
+
- **Enabled**
|
|
341
|
+
- **Field**: `trace.enabled`
|
|
342
|
+
- **Default**: `false`
|
|
343
|
+
- **Description**: Enable tracing/observability
|
|
344
|
+
- **Environment Variable**: `AK_TRACE__ENABLED`
|
|
345
|
+
|
|
346
|
+
- **Type**
|
|
347
|
+
- **Field**: `trace.type`
|
|
348
|
+
- **Options**: `langfuse`, `openllmetry`
|
|
349
|
+
- **Default**: `langfuse`
|
|
350
|
+
- **Description**: Type of tracing provider to use
|
|
351
|
+
- **Environment Variable**: `AK_TRACE__TYPE`
|
|
352
|
+
|
|
353
|
+
**Langfuse Setup:**
|
|
354
|
+
|
|
355
|
+
To use Langfuse for tracing, install the langfuse extra:
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
pip install agentkernel[langfuse]
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Configure Langfuse credentials via environment variables:
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
export LANGFUSE_PUBLIC_KEY=pk-lf-...
|
|
365
|
+
export LANGFUSE_SECRET_KEY=sk-lf-...
|
|
366
|
+
export LANGFUSE_HOST=https://cloud.langfuse.com # or your self-hosted instance
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Enable tracing in your configuration:
|
|
370
|
+
|
|
371
|
+
```yaml
|
|
372
|
+
trace:
|
|
373
|
+
enabled: true
|
|
374
|
+
type: langfuse
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**OpenLLMetry (Traceloop) Setup:**
|
|
378
|
+
|
|
379
|
+
To use OpenLLMetry for tracing, install the openllmetry extra:
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
pip install agentkernel[openllmetry]
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Configure Traceloop credentials via environment variables:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
export TRACELOOP_API_KEY=your-api-key
|
|
389
|
+
export TRACELOOP_BASE_URL=https://api.traceloop.com # Optional: for self-hosted
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Enable tracing in your configuration:
|
|
393
|
+
|
|
394
|
+
```yaml
|
|
395
|
+
trace:
|
|
396
|
+
enabled: true
|
|
397
|
+
type: openllmetry
|
|
398
|
+
```
|
|
378
399
|
|
|
379
400
|
### Configuration Examples
|
|
380
401
|
|
|
@@ -384,14 +405,22 @@ Use the `AK_` prefix and underscores for nested fields:
|
|
|
384
405
|
|
|
385
406
|
```bash
|
|
386
407
|
export AK_DEBUG=true
|
|
387
|
-
export
|
|
388
|
-
export
|
|
389
|
-
export
|
|
390
|
-
export
|
|
391
|
-
export
|
|
392
|
-
export
|
|
393
|
-
export
|
|
394
|
-
export
|
|
408
|
+
export AK_SESSION__TYPE=redis
|
|
409
|
+
export AK_SESSION__REDIS__URL=redis://localhost:6379
|
|
410
|
+
export AK_SESSION__REDIS__TTL=604800
|
|
411
|
+
export AK_SESSION__REDIS__PREFIX=ak:sessions:
|
|
412
|
+
export AK_API__HOST=0.0.0.0
|
|
413
|
+
export AK_API__PORT=8000
|
|
414
|
+
export AK_A2A__ENABLED=true
|
|
415
|
+
export AK_MCP__ENABLED=false
|
|
416
|
+
export AK_TRACE__ENABLED=true
|
|
417
|
+
export AK_TRACE__TYPE=langfuse # or openllmetry
|
|
418
|
+
# For Langfuse:
|
|
419
|
+
# export LANGFUSE_PUBLIC_KEY=pk-lf-...
|
|
420
|
+
# export LANGFUSE_SECRET_KEY=sk-lf-...
|
|
421
|
+
# export LANGFUSE_HOST=https://cloud.langfuse.com
|
|
422
|
+
# For OpenLLMetry:
|
|
423
|
+
# export TRACELOOP_API_KEY=your-api-key
|
|
395
424
|
```
|
|
396
425
|
|
|
397
426
|
#### .env File
|
|
@@ -400,14 +429,22 @@ Create a `.env` file in your working directory:
|
|
|
400
429
|
|
|
401
430
|
```env
|
|
402
431
|
AK_DEBUG=false
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
432
|
+
AK_SESSION__TYPE=redis
|
|
433
|
+
AK_SESSION__REDIS__URL=rediss://my-redis:6379
|
|
434
|
+
AK_SESSION__REDIS__TTL=1209600
|
|
435
|
+
AK_SESSION__REDIS__PREFIX=ak:prod:sessions:
|
|
436
|
+
AK_API__HOST=0.0.0.0
|
|
437
|
+
AK_API__PORT=8080
|
|
438
|
+
AK_A2A__ENABLED=true
|
|
439
|
+
AK_A2A__URL=http://localhost:8080/a2a
|
|
440
|
+
AK_TRACE__ENABLED=true
|
|
441
|
+
AK_TRACE__TYPE=langfuse # or openllmetry
|
|
442
|
+
# Langfuse credentials (if using langfuse):
|
|
443
|
+
# LANGFUSE_PUBLIC_KEY=pk-lf-...
|
|
444
|
+
# LANGFUSE_SECRET_KEY=sk-lf-...
|
|
445
|
+
# LANGFUSE_HOST=https://cloud.langfuse.com
|
|
446
|
+
# OpenLLMetry credentials (if using openllmetry):
|
|
447
|
+
# TRACELOOP_API_KEY=your-api-key
|
|
411
448
|
```
|
|
412
449
|
|
|
413
450
|
#### config.yaml
|
|
@@ -435,6 +472,9 @@ mcp:
|
|
|
435
472
|
expose_agents: false
|
|
436
473
|
agents: ["*"]
|
|
437
474
|
url: http://localhost:8000/mcp
|
|
475
|
+
trace:
|
|
476
|
+
enabled: true
|
|
477
|
+
type: langfuse
|
|
438
478
|
```
|
|
439
479
|
|
|
440
480
|
#### config.json
|
|
@@ -468,6 +508,10 @@ mcp:
|
|
|
468
508
|
"expose_agents": false,
|
|
469
509
|
"agents": ["*"],
|
|
470
510
|
"url": "http://localhost:8000/mcp"
|
|
511
|
+
},
|
|
512
|
+
"trace": {
|
|
513
|
+
"enabled": true,
|
|
514
|
+
"type": "langfuse"
|
|
471
515
|
}
|
|
472
516
|
}
|
|
473
517
|
```
|