How openjiuwen-ai/agent-runtime works
openJiuwen Agent Runtime deploys and manages isolated agent instances, then exposes their own service endpoints for conversations and health checks. The main workflow is management REST request → deployment manager and selected strategy → running agent service. The repository also includes tenant context handling, persistent deployment records, and concrete A2A and workflow-IR applications. The README documents the deployment modes and service capabilities; edges into unsampled deployer and agent implementations are limited to those documented relationships.
Main entry points: main.py Management REST · manager.py Deployment Manager · app.py A2A Service · ir_execution_service_app.py IR Execution API
Components 21
Management API
- Management REST
server/openjiuwen_runtime/server/main.py - Tenant Context
server/openjiuwen_runtime/server/middleware/tenant.py
Deployment Lifecycle
- Deployment Manager
management/openjiuwen_runtime/management/manager.py - Deployment Strategies
management/openjiuwen_runtime/management/deployments - Service Lifecycle
management/openjiuwen_runtime/management/session/service_manager.py
Runtime Foundation
- Deployment Records
foundation/openjiuwen_runtime/foundation/db/sqlalchemy_handler.py - Database Handlers
foundation/openjiuwen_runtime/foundation/db/handler.py - Port Allocation
foundation/openjiuwen_runtime/foundation/port_utils.py
Agent Services
- Agent Service API
service/openjiuwen_runtime/service/app/agent_app.py - App Abstractions
service/openjiuwen_runtime/service/app/base_app.py
Agent Applications
- A2A Service
applications/a2a_service/app.py - Conversation Router
applications/a2a_service/orchestrator/user_router.py - A2A Executor
applications/a2a_service/orchestrator/executor.py - A2A Task Store
applications/a2a_service/common/redis_task_store.py - Versatile Adapter
applications/versatile_adapter/app.py - Adapter Runner
applications/versatile_adapter/dispatcher/runner.py - IR Execution API
applications/ir_execution_service/ir_execution_service/ir_execution_service_app.py - Invoke Execution
applications/ir_execution_service/ir_execution_service/invoke_api.py - Stream Execution
applications/ir_execution_service/ir_execution_service/stream_api.py - Memory Engine
applications/ir_execution_service/ir_execution_service/runtime_support/memory_engine_start.py
Other components
- Runtime Client
Connections 19
- Runtime Client → Management REST: calls management API
README.md - Management REST → Tenant Context: reads tenant context
server/openjiuwen_runtime/server/main.py - Management REST → Deployment Manager: requests deployment actions
server/openjiuwen_runtime/server/main.py - Deployment Manager → Deployment Strategies: selects strategy
management/openjiuwen_runtime/management/manager.py - Deployment Manager → Database Handlers: persists deployments
management/openjiuwen_runtime/management/manager.py - Database Handlers → Deployment Records: stores records
foundation/openjiuwen_runtime/foundation/db/sqlalchemy_handler.py - Deployment Strategies → Agent Service API: starts agent instance
README.md - Deployment Manager → Service Lifecycle: manages instances
- Management REST → Port Allocation: allocates ports
server/openjiuwen_runtime/server/main.py - Runtime Client → Agent Service API: calls agent endpoints
README.md - Agent Service API → App Abstractions: extends app base
service/openjiuwen_runtime/service/app/agent_app.py - A2A Service → Conversation Router: routes conversations
applications/a2a_service/app.py - Conversation Router → A2A Executor: dispatches execution
applications/a2a_service/orchestrator/user_router.py - A2A Service → A2A Task Store: uses task store
applications/a2a_service/app.py - A2A Service → Versatile Adapter: calls internal A2A service
applications/a2a_service/app.py - Versatile Adapter → Adapter Runner: creates runner
applications/versatile_adapter/app.py - IR Execution API → Invoke Execution: routes invoke requests
applications/ir_execution_service/ir_execution_service/ir_execution_service_app.py - IR Execution API → Stream Execution: routes stream requests
applications/ir_execution_service/ir_execution_service/ir_execution_service_app.py - IR Execution API → App Abstractions: extends app base
applications/ir_execution_service/ir_execution_service/ir_execution_service_app.py