jaf-py 2.3.1__tar.gz → 2.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jaf_py-2.3.1 → jaf_py-2.4.1}/PKG-INFO +119 -119
- {jaf_py-2.3.1 → jaf_py-2.4.1}/README.md +118 -118
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/engine.py +111 -2
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/tools.py +4 -6
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/types.py +44 -1
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/providers/model.py +165 -2
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf_py.egg-info/PKG-INFO +119 -119
- {jaf_py-2.3.1 → jaf_py-2.4.1}/pyproject.toml +1 -1
- {jaf_py-2.3.1 → jaf_py-2.4.1}/LICENSE +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/agent.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/agent_card.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/client.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/examples/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/examples/client_example.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/examples/integration_example.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/examples/rag_demo/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/examples/server_demo/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/examples/server_example.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/cleanup.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/factory.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/providers/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/providers/composite.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/providers/in_memory.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/providers/postgres.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/providers/redis.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/serialization.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/tests/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/tests/run_comprehensive_tests.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/tests/test_cleanup.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/tests/test_serialization.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/tests/test_stress_concurrency.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/tests/test_task_lifecycle.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/memory/types.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/protocol.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/server.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/standalone_client.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/tests/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/tests/run_tests.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/tests/test_agent.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/tests/test_client.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/tests/test_integration.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/tests/test_protocol.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/tests/test_types.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/a2a/types.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/cli.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/agent_tool.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/analytics.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/composition.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/errors.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/performance.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/proxy.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/proxy_helpers.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/streaming.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/tool_results.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/tracing.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/core/workflows.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/exceptions.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/memory/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/memory/factory.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/memory/providers/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/memory/providers/in_memory.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/memory/providers/postgres.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/memory/providers/redis.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/memory/types.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/memory/utils.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/plugins/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/plugins/base.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/policies/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/policies/handoff.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/policies/validation.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/providers/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/providers/mcp.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/server/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/server/main.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/server/server.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/server/types.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/visualization/__init__.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/visualization/example.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/visualization/functional_core.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/visualization/graphviz.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/visualization/imperative_shell.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf/visualization/types.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf_py.egg-info/SOURCES.txt +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf_py.egg-info/dependency_links.txt +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf_py.egg-info/entry_points.txt +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf_py.egg-info/requires.txt +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/jaf_py.egg-info/top_level.txt +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/setup.cfg +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/setup.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_a2a_deep.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_a2a_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_api_reference_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_callback_system_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_coffee_tool.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_conversation_id_fix.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_deployment_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_docs_code_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_engine.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_engine_manual.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_error_handling_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_getting_started_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_math_tool.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_mcp_comprehensive.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_mcp_docs.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_mcp_real_functionality.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_mcp_transports.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_memory_system_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_model_providers_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_property_based.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_proxy_simple.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_redis_fixes.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_redis_memory.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_server_api_examples.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_session_continuity.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_streamable_http_mcp_example.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_timeout_functionality.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_tool_integration.py +0 -0
- {jaf_py-2.3.1 → jaf_py-2.4.1}/tests/test_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaf-py
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.1
|
|
4
4
|
Summary: A purely functional agent framework with immutable state and composable tools - Python implementation
|
|
5
5
|
Author: JAF Contributors
|
|
6
6
|
Maintainer: JAF Contributors
|
|
@@ -73,67 +73,67 @@ Dynamic: license-file
|
|
|
73
73
|
|
|
74
74
|
<!--  -->
|
|
75
75
|
|
|
76
|
-
[](https://github.com/xynehq/jaf-py)
|
|
77
77
|
[](https://www.python.org/)
|
|
78
78
|
[](https://xynehq.github.io/jaf-py/)
|
|
79
79
|
|
|
80
80
|
A purely functional agent framework with immutable state and composable tools, professionally converted from TypeScript to Python. JAF enables building production-ready AI agent systems with built-in security, observability, and error handling.
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
##
|
|
85
|
-
|
|
86
|
-
**[
|
|
87
|
-
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
###
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
###
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
###
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
###
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
###
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
###
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
|
|
129
|
-
###
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
##
|
|
82
|
+
**Production Ready**: Complete feature parity with TypeScript version, comprehensive test suite, and production deployment support.
|
|
83
|
+
|
|
84
|
+
## **[Read the Full Documentation](https://xynehq.github.io/jaf-py/)**
|
|
85
|
+
|
|
86
|
+
**[ Get Started →](https://xynehq.github.io/jaf-py/getting-started/)** | **[ API Reference →](https://xynehq.github.io/jaf-py/api-reference/)** | **[ Examples →](https://xynehq.github.io/jaf-py/examples/)**
|
|
87
|
+
|
|
88
|
+
## Key Features
|
|
89
|
+
|
|
90
|
+
### **Complete TypeScript Conversion**
|
|
91
|
+
- **Full Feature Parity**: All TypeScript functionality converted to Python
|
|
92
|
+
- **Type Safety**: Pydantic models with runtime validation
|
|
93
|
+
- **Immutable State**: Functional programming principles preserved
|
|
94
|
+
- **Tool Integration**: Complete tool calling and execution system
|
|
95
|
+
|
|
96
|
+
### **Production Ready Server**
|
|
97
|
+
- **FastAPI Server**: High-performance async HTTP API
|
|
98
|
+
- **Auto Documentation**: Interactive API docs at `/docs`
|
|
99
|
+
- **Health Monitoring**: Built-in health checks and metrics
|
|
100
|
+
- **CORS Support**: Ready for browser integration
|
|
101
|
+
|
|
102
|
+
### **Model Context Protocol (MCP)**
|
|
103
|
+
- **MCP Client**: Full MCP specification support
|
|
104
|
+
- **Stdio & SSE**: Multiple transport protocols
|
|
105
|
+
- **Tool Integration**: Seamless MCP tool integration
|
|
106
|
+
- **Auto Discovery**: Dynamic tool loading from MCP servers
|
|
107
|
+
|
|
108
|
+
### **Enterprise Security**
|
|
109
|
+
- **Input Guardrails**: Content filtering and validation
|
|
110
|
+
- **Output Guardrails**: Response sanitization
|
|
111
|
+
- **Permission System**: Role-based access control
|
|
112
|
+
- **Audit Logging**: Complete interaction tracing
|
|
113
|
+
- **Proxy Support**: Corporate proxy integration with authentication
|
|
114
|
+
|
|
115
|
+
### **Observability & Monitoring**
|
|
116
|
+
- **Real-time Tracing**: Event-driven observability
|
|
117
|
+
- **OpenTelemetry Integration**: Distributed tracing with OTLP
|
|
118
|
+
- **Langfuse Tracing**: LLM observability and analytics
|
|
119
|
+
- **Structured Logging**: JSON-formatted logs
|
|
120
|
+
- **Error Handling**: Comprehensive error types and recovery
|
|
121
|
+
- **Performance Metrics**: Built-in timing and counters
|
|
122
|
+
|
|
123
|
+
### **Agent-as-Tool Architecture**
|
|
124
|
+
- **Hierarchical Orchestration**: Use agents as tools in other agents
|
|
125
|
+
- **Conditional Tool Enabling**: Enable/disable agent tools based on context
|
|
126
|
+
- **Session Management**: Configurable session inheritance for sub-agents
|
|
127
|
+
- **Flexible Output Extraction**: Custom extractors for agent tool outputs
|
|
128
|
+
|
|
129
|
+
### **Developer Experience**
|
|
130
|
+
- **CLI Tools**: Project initialization and management
|
|
131
|
+
- **Hot Reload**: Development server with auto-reload
|
|
132
|
+
- **Type Hints**: Full mypy compatibility
|
|
133
|
+
- **Rich Examples**: RAG, multi-agent, agent-as-tool, and server demos
|
|
134
|
+
- **Visual Architecture**: Graphviz-powered agent and tool diagrams
|
|
135
|
+
|
|
136
|
+
## Core Philosophy
|
|
137
137
|
|
|
138
138
|
- **Immutability**: All core data structures are deeply immutable
|
|
139
139
|
- **Pure Functions**: Core logic expressed as pure, predictable functions
|
|
@@ -141,7 +141,7 @@ A purely functional agent framework with immutable state and composable tools, p
|
|
|
141
141
|
- **Composition over Configuration**: Build complex behavior by composing simple functions
|
|
142
142
|
- **Type-Safe by Design**: Leverages Python's type system with Pydantic for runtime safety
|
|
143
143
|
|
|
144
|
-
##
|
|
144
|
+
## Quick Start
|
|
145
145
|
|
|
146
146
|
### Installation
|
|
147
147
|
|
|
@@ -197,37 +197,37 @@ pip install -r requirements-docs.txt
|
|
|
197
197
|
./docs.sh deploy # Deploy to GitHub Pages
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
##
|
|
200
|
+
## Documentation
|
|
201
201
|
|
|
202
|
-
###
|
|
202
|
+
### **[Official Documentation Website](https://xynehq.github.io/jaf-py/)**
|
|
203
203
|
|
|
204
204
|
The complete, searchable documentation is available at **[xynehq.github.io/jaf-py](https://xynehq.github.io/jaf-py/)** with:
|
|
205
205
|
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
-
|
|
211
|
-
-
|
|
206
|
+
- **Interactive navigation** with search and filtering
|
|
207
|
+
- **Dark/light mode** with automatic system preference detection
|
|
208
|
+
- **Mobile-responsive design** for documentation on any device
|
|
209
|
+
- **Live code examples** with syntax highlighting
|
|
210
|
+
- **API reference** with auto-generated documentation
|
|
211
|
+
- **Always up-to-date** with automatic deployments
|
|
212
212
|
|
|
213
|
-
###
|
|
213
|
+
### **Local Documentation**
|
|
214
214
|
|
|
215
215
|
For offline access, documentation is also available in the [`docs/`](docs/) directory:
|
|
216
216
|
|
|
217
|
-
- **[
|
|
218
|
-
- **[
|
|
219
|
-
- **[
|
|
220
|
-
- **[
|
|
221
|
-
- **[
|
|
222
|
-
- **[
|
|
223
|
-
- **[
|
|
224
|
-
- **[
|
|
225
|
-
- **[
|
|
226
|
-
- **[
|
|
227
|
-
- **[
|
|
228
|
-
- **[
|
|
229
|
-
|
|
230
|
-
##
|
|
217
|
+
- **[ Documentation Hub](docs/README.md)** - Your starting point for all documentation
|
|
218
|
+
- **[ Getting Started](docs/getting-started.md)** - Installation and first agent tutorial
|
|
219
|
+
- **[ Core Concepts](docs/core-concepts.md)** - JAF's functional architecture principles
|
|
220
|
+
- **[ API Reference](docs/api-reference.md)** - Complete Python API documentation
|
|
221
|
+
- **[ Tools Guide](docs/tools.md)** - Creating and using tools
|
|
222
|
+
- **[ Memory System](docs/memory-system.md)** - Persistence and memory providers
|
|
223
|
+
- **[ Model Providers](docs/model-providers.md)** - LiteLLM integration
|
|
224
|
+
- **[ Monitoring](docs/monitoring.md)** - Observability, metrics, and alerting
|
|
225
|
+
- **[ Server API](docs/server-api.md)** - FastAPI endpoints reference
|
|
226
|
+
- **[ Deployment](docs/deployment.md)** - Production deployment guide
|
|
227
|
+
- **[ Examples](docs/examples.md)** - Detailed example walkthroughs
|
|
228
|
+
- **[ Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions
|
|
229
|
+
|
|
230
|
+
## Project Structure
|
|
231
231
|
|
|
232
232
|
```
|
|
233
233
|
jaf-py/
|
|
@@ -243,7 +243,7 @@ jaf-py/
|
|
|
243
243
|
└── tests/ # Test suite
|
|
244
244
|
```
|
|
245
245
|
|
|
246
|
-
##
|
|
246
|
+
## Architectural Visualization
|
|
247
247
|
|
|
248
248
|
JAF includes powerful visualization capabilities to help you understand and document your agent systems.
|
|
249
249
|
|
|
@@ -295,7 +295,7 @@ async def main():
|
|
|
295
295
|
)
|
|
296
296
|
|
|
297
297
|
if result.success:
|
|
298
|
-
print(f"
|
|
298
|
+
print(f" Visualization saved to: {result.output_path}")
|
|
299
299
|
else:
|
|
300
300
|
print(f"❌ Error: {result.error}")
|
|
301
301
|
|
|
@@ -304,12 +304,12 @@ asyncio.run(main())
|
|
|
304
304
|
|
|
305
305
|
### Features
|
|
306
306
|
|
|
307
|
-
-
|
|
308
|
-
-
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
-
|
|
312
|
-
-
|
|
307
|
+
- **Multiple Color Schemes**: Choose from `default`, `modern`, or `minimal` themes
|
|
308
|
+
- **Agent Architecture**: Visualize agents, tools, and handoff relationships
|
|
309
|
+
- **Tool Ecosystems**: Generate dedicated tool interaction diagrams
|
|
310
|
+
- **Runner Architecture**: Show complete system architecture with session layers
|
|
311
|
+
- **Multiple Formats**: Export as PNG, SVG, or PDF
|
|
312
|
+
- **Customizable Layouts**: Support for various Graphviz layouts (`dot`, `circo`, `neato`, etc.)
|
|
313
313
|
|
|
314
314
|
### Example Output
|
|
315
315
|
|
|
@@ -336,7 +336,7 @@ await run_visualization_examples()
|
|
|
336
336
|
# - ./examples/agent-modern.png (modern color scheme)
|
|
337
337
|
```
|
|
338
338
|
|
|
339
|
-
##
|
|
339
|
+
## Key Components
|
|
340
340
|
|
|
341
341
|
### Core Types
|
|
342
342
|
|
|
@@ -414,7 +414,7 @@ async def main():
|
|
|
414
414
|
asyncio.run(main())
|
|
415
415
|
```
|
|
416
416
|
|
|
417
|
-
##
|
|
417
|
+
## Security & Validation
|
|
418
418
|
|
|
419
419
|
### Composable Validation Policies
|
|
420
420
|
|
|
@@ -449,7 +449,7 @@ config = RunConfig(
|
|
|
449
449
|
)
|
|
450
450
|
```
|
|
451
451
|
|
|
452
|
-
##
|
|
452
|
+
## Agent-as-Tool Functionality
|
|
453
453
|
|
|
454
454
|
JAF 2.2+ introduces powerful agent-as-tool capabilities, allowing you to use agents as tools within other agents for hierarchical orchestration:
|
|
455
455
|
|
|
@@ -528,7 +528,7 @@ def create_triage_agent():
|
|
|
528
528
|
)
|
|
529
529
|
```
|
|
530
530
|
|
|
531
|
-
##
|
|
531
|
+
## Observability
|
|
532
532
|
|
|
533
533
|
### Real-time Tracing
|
|
534
534
|
|
|
@@ -605,7 +605,7 @@ if result.outcome.status == 'error':
|
|
|
605
605
|
print(f"[{severity}] {formatted_error} (retryable: {is_retryable})")
|
|
606
606
|
```
|
|
607
607
|
|
|
608
|
-
##
|
|
608
|
+
## Provider Integrations
|
|
609
609
|
|
|
610
610
|
### A2A (Agent-to-Agent) Communication
|
|
611
611
|
|
|
@@ -672,7 +672,7 @@ from jaf.providers.mcp import create_mcp_sse_client
|
|
|
672
672
|
sse_client = create_mcp_sse_client('http://localhost:8080/sse')
|
|
673
673
|
```
|
|
674
674
|
|
|
675
|
-
##
|
|
675
|
+
## Development Server
|
|
676
676
|
|
|
677
677
|
JAF includes a built-in development server for testing agents locally via HTTP endpoints:
|
|
678
678
|
|
|
@@ -706,7 +706,7 @@ Server provides RESTful endpoints:
|
|
|
706
706
|
- `POST /chat` - General chat endpoint
|
|
707
707
|
- `POST /agents/{name}/chat` - Agent-specific endpoint
|
|
708
708
|
|
|
709
|
-
##
|
|
709
|
+
## Function Composition
|
|
710
710
|
|
|
711
711
|
JAF supports functional composition patterns for building complex behaviors from simple, reusable functions:
|
|
712
712
|
|
|
@@ -742,7 +742,7 @@ enhanced_tool = create_function_tool({
|
|
|
742
742
|
- **Type Safety**: Full type checking support
|
|
743
743
|
- **Performance**: Optimize individual pieces independently
|
|
744
744
|
|
|
745
|
-
##
|
|
745
|
+
## Example Applications
|
|
746
746
|
|
|
747
747
|
Explore the example applications to see the framework in action:
|
|
748
748
|
|
|
@@ -754,12 +754,12 @@ python server_example.py
|
|
|
754
754
|
```
|
|
755
755
|
|
|
756
756
|
**Features demonstrated:**
|
|
757
|
-
-
|
|
758
|
-
-
|
|
759
|
-
-
|
|
760
|
-
-
|
|
761
|
-
-
|
|
762
|
-
-
|
|
757
|
+
- Multiple specialized agents (math, weather, general)
|
|
758
|
+
- Tool integration (calculator, weather API)
|
|
759
|
+
- Agent handoffs and routing
|
|
760
|
+
- RESTful API with auto-documentation
|
|
761
|
+
- Real-time tracing and error handling
|
|
762
|
+
- Production-ready server configuration
|
|
763
763
|
|
|
764
764
|
**Available endpoints:**
|
|
765
765
|
- `GET /health` - Server health check
|
|
@@ -778,11 +778,11 @@ python agent_as_tool_example.py --server
|
|
|
778
778
|
```
|
|
779
779
|
|
|
780
780
|
**Features demonstrated:**
|
|
781
|
-
-
|
|
782
|
-
-
|
|
783
|
-
-
|
|
784
|
-
-
|
|
785
|
-
-
|
|
781
|
+
- Hierarchical agent orchestration
|
|
782
|
+
- Conditional tool enabling based on context
|
|
783
|
+
- Custom output extraction from agent tools
|
|
784
|
+
- Session management for sub-agents
|
|
785
|
+
- Translation agents working together
|
|
786
786
|
|
|
787
787
|
### 3. Tracing Integration Demos
|
|
788
788
|
|
|
@@ -796,10 +796,10 @@ python langfuse_tracing_demo.py
|
|
|
796
796
|
```
|
|
797
797
|
|
|
798
798
|
**Features demonstrated:**
|
|
799
|
-
-
|
|
800
|
-
-
|
|
801
|
-
-
|
|
802
|
-
-
|
|
799
|
+
- OpenTelemetry distributed tracing setup
|
|
800
|
+
- Langfuse LLM observability integration
|
|
801
|
+
- Composite trace collectors
|
|
802
|
+
- Real-time monitoring and analytics
|
|
803
803
|
|
|
804
804
|
### 4. MCP Integration Demo
|
|
805
805
|
|
|
@@ -809,12 +809,12 @@ python main.py
|
|
|
809
809
|
```
|
|
810
810
|
|
|
811
811
|
**Features demonstrated:**
|
|
812
|
-
-
|
|
813
|
-
-
|
|
814
|
-
-
|
|
815
|
-
-
|
|
812
|
+
- Model Context Protocol integration
|
|
813
|
+
- Dynamic tool loading from MCP servers
|
|
814
|
+
- Secure filesystem operations
|
|
815
|
+
- MCP client configuration and management
|
|
816
816
|
|
|
817
|
-
##
|
|
817
|
+
## Testing
|
|
818
818
|
|
|
819
819
|
```bash
|
|
820
820
|
pytest # Run tests
|
|
@@ -823,7 +823,7 @@ mypy . # Type checking
|
|
|
823
823
|
black . # Format code
|
|
824
824
|
```
|
|
825
825
|
|
|
826
|
-
##
|
|
826
|
+
## Architecture Principles
|
|
827
827
|
|
|
828
828
|
### Immutable State Machine
|
|
829
829
|
- All state transformations create new state objects
|
|
@@ -859,4 +859,4 @@ MIT
|
|
|
859
859
|
|
|
860
860
|
---
|
|
861
861
|
|
|
862
|
-
**JAF (Juspay Agentic Framework) v2.2** - Building the future of functional AI agent systems
|
|
862
|
+
**JAF (Juspay Agentic Framework) v2.2** - Building the future of functional AI agent systems
|