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.
Files changed (62) hide show
  1. agentkernel-0.2.2/README.md → agentkernel-0.2.4/PKG-INFO +175 -32
  2. agentkernel-0.2.2/PKG-INFO → agentkernel-0.2.4/README.md +119 -75
  3. {agentkernel-0.2.2 → agentkernel-0.2.4}/pyproject.toml +26 -12
  4. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/a2a/a2a.py +8 -6
  5. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/adk/__init__.py +1 -1
  6. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/adk/adk.py +30 -42
  7. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/api/__init__.py +2 -0
  8. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/api/a2a.py +4 -6
  9. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/api/agent.py +27 -21
  10. agentkernel-0.2.4/src/agentkernel/api/rest_request_handler.py +26 -0
  11. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/api/restapi.py +16 -8
  12. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/aws/aklambda.py +35 -16
  13. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/cli/__init__.py +1 -0
  14. agentkernel-0.2.4/src/agentkernel/cli/cli.py +109 -0
  15. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/__init__.py +4 -3
  16. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/base.py +6 -5
  17. agentkernel-0.2.4/src/agentkernel/core/builder.py +84 -0
  18. agentkernel-0.2.4/src/agentkernel/core/config.py +93 -0
  19. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/module.py +3 -3
  20. agentkernel-0.2.4/src/agentkernel/core/runtime.py +204 -0
  21. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/service.py +2 -2
  22. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/sessions/__init__.py +2 -1
  23. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/sessions/base.py +1 -1
  24. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/sessions/redis.py +5 -8
  25. agentkernel-0.2.4/src/agentkernel/core/util/config_yaml_util.py +173 -0
  26. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/crewai/crewai.py +26 -24
  27. agentkernel-0.2.4/src/agentkernel/integrations/__init__.py +12 -0
  28. agentkernel-0.2.4/src/agentkernel/integrations/slack/README.md +60 -0
  29. agentkernel-0.2.4/src/agentkernel/integrations/slack/__init__.py +14 -0
  30. agentkernel-0.2.4/src/agentkernel/integrations/slack/slack_chat.py +160 -0
  31. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/langgraph/langgraph.py +80 -76
  32. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/mcp/__init__.py +1 -0
  33. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/mcp/akmcp.py +6 -5
  34. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/openai/openai.py +17 -15
  35. agentkernel-0.2.4/src/agentkernel/slack.py +8 -0
  36. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/test/test.py +7 -6
  37. agentkernel-0.2.4/src/agentkernel/trace/__init__.py +8 -0
  38. agentkernel-0.2.4/src/agentkernel/trace/base.py +40 -0
  39. agentkernel-0.2.4/src/agentkernel/trace/langfuse/__init__.py +0 -0
  40. agentkernel-0.2.4/src/agentkernel/trace/langfuse/adk.py +35 -0
  41. agentkernel-0.2.4/src/agentkernel/trace/langfuse/crewai.py +37 -0
  42. agentkernel-0.2.4/src/agentkernel/trace/langfuse/langfuse.py +60 -0
  43. agentkernel-0.2.4/src/agentkernel/trace/langfuse/langgraph.py +46 -0
  44. agentkernel-0.2.4/src/agentkernel/trace/langfuse/openai.py +35 -0
  45. agentkernel-0.2.4/src/agentkernel/trace/openllmetry/__init__.py +0 -0
  46. agentkernel-0.2.4/src/agentkernel/trace/openllmetry/adk.py +29 -0
  47. agentkernel-0.2.4/src/agentkernel/trace/openllmetry/crewai.py +29 -0
  48. agentkernel-0.2.4/src/agentkernel/trace/openllmetry/langgraph.py +29 -0
  49. agentkernel-0.2.4/src/agentkernel/trace/openllmetry/openai.py +29 -0
  50. agentkernel-0.2.4/src/agentkernel/trace/openllmetry/openllmetry.py +133 -0
  51. agentkernel-0.2.4/src/agentkernel/trace/trace.py +86 -0
  52. agentkernel-0.2.2/src/agentkernel/cli/cli.py +0 -103
  53. agentkernel-0.2.2/src/agentkernel/core/config.py +0 -171
  54. agentkernel-0.2.2/src/agentkernel/core/runtime.py +0 -110
  55. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/__init__.py +0 -0
  56. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/a2a/__init__.py +0 -0
  57. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/aws/__init__.py +0 -0
  58. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/core/sessions/in_memory.py +1 -1
  59. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/crewai/__init__.py +0 -0
  60. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/langgraph/__init__.py +0 -0
  61. {agentkernel-0.2.2 → agentkernel-0.2.4}/src/agentkernel/openai/__init__.py +0 -0
  62. {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
  [![PyPI version](https://badge.fury.io/py/agentkernel.svg)](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**: `AK_SESSION_TYPE`
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**: `AK_SESSION_REDIS_URL`
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**: `AK_SESSION_REDIS_TTL`
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**: `AK_SESSION_REDIS_PREFIX`
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**: `AK_API_HOST`
326
+ - **Environment Variable**: `AK_API__HOST`
271
327
 
272
328
  - **Port**
273
329
  - **Field**: `api.port`
274
330
  - **Default**: `8000`
275
- - **Environment Variable**: `AK_API_PORT`
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**: `AK_API_CUSTOM_ROUTER_PREFIX`
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**: `AK_API_ENABLED_ROUTES_AGENTS`
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**: `AK_A2A_ENABLED`
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**: `AK_A2A_AGENTS` (comma-separated)
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**: `AK_A2A_URL`
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**: `AK_A2A_TASK_STORE_TYPE`
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**: `AK_MCP_ENABLED`
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**: `AK_MCP_EXPOSE_AGENTS`
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**: `AK_MCP_AGENTS` (comma-separated)
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**: `AK_MCP_URL`
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 AK_SESSION_TYPE=redis
345
- export AK_SESSION_REDIS_URL=redis://localhost:6379
346
- export AK_SESSION_REDIS_TTL=604800
347
- export AK_SESSION_REDIS_PREFIX=ak:sessions:
348
- export AK_API_HOST=0.0.0.0
349
- export AK_API_PORT=8000
350
- export AK_A2A_ENABLED=true
351
- export AK_MCP_ENABLED=false
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
- AK_SESSION_TYPE=redis
361
- AK_SESSION_REDIS_URL=rediss://my-redis:6379
362
- AK_SESSION_REDIS_TTL=1209600
363
- AK_SESSION_REDIS_PREFIX=ak:prod:sessions:
364
- AK_API_HOST=0.0.0.0
365
- AK_API_PORT=8080
366
- AK_A2A_ENABLED=true
367
- AK_A2A_URL=http://localhost:8080/a2a
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
  [![PyPI version](https://badge.fury.io/py/agentkernel.svg)](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**: `AK_SESSION_TYPE`
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**: `AK_SESSION_REDIS_URL`
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**: `AK_SESSION_REDIS_TTL`
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**: `AK_SESSION_REDIS_PREFIX`
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**: `AK_API_HOST`
270
+ - **Environment Variable**: `AK_API__HOST`
314
271
 
315
272
  - **Port**
316
273
  - **Field**: `api.port`
317
274
  - **Default**: `8000`
318
- - **Environment Variable**: `AK_API_PORT`
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**: `AK_API_CUSTOM_ROUTER_PREFIX`
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**: `AK_API_ENABLED_ROUTES_AGENTS`
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**: `AK_A2A_ENABLED`
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**: `AK_A2A_AGENTS` (comma-separated)
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**: `AK_A2A_URL`
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**: `AK_A2A_TASK_STORE_TYPE`
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**: `AK_MCP_ENABLED`
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**: `AK_MCP_EXPOSE_AGENTS`
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**: `AK_MCP_AGENTS` (comma-separated)
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**: `AK_MCP_URL`
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 AK_SESSION_TYPE=redis
388
- export AK_SESSION_REDIS_URL=redis://localhost:6379
389
- export AK_SESSION_REDIS_TTL=604800
390
- export AK_SESSION_REDIS_PREFIX=ak:sessions:
391
- export AK_API_HOST=0.0.0.0
392
- export AK_API_PORT=8000
393
- export AK_A2A_ENABLED=true
394
- export AK_MCP_ENABLED=false
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
- AK_SESSION_TYPE=redis
404
- AK_SESSION_REDIS_URL=rediss://my-redis:6379
405
- AK_SESSION_REDIS_TTL=1209600
406
- AK_SESSION_REDIS_PREFIX=ak:prod:sessions:
407
- AK_API_HOST=0.0.0.0
408
- AK_API_PORT=8080
409
- AK_A2A_ENABLED=true
410
- AK_A2A_URL=http://localhost:8080/a2a
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
  ```