How ljxpython/ai-agent-platform works
This is an enterprise AI-agent platform split into a governance/control-plane API, a Vue console, and a LangGraph runtime. The main user journey is: authenticate and choose a project or agent in the console; the platform authorizes the request and assembles managed runtime parameters; the runtime executes the graph and tools, then streams run events back for chat and trace display. Other documented product capabilities include model catalog governance, project and identity management, audit, workspace, memory, skills, and human approval. Runtime details beyond the documented flow are not fully represented in the sampled source.
Main entry points: main.py Platform API · service.py Runtime Gateway · graphs Agent Graphs · dearflow_agent DeerFlow Capabilities
Components 23
Web Console
- Chat Session
apps/platform-web/src/modules/chat/composables/useChatSession.ts - Session Service
apps/platform-web/src/services/threads/session.service.ts - Console Areas
apps/platform-web/src/modules
Platform Governance
- Platform API
apps/platform-api/src/platform_api/main.py - Request Context
apps/platform-api/src/platform_api/core/context/models.py - IAM Policies
apps/platform-api/src/platform_api/modules/iam/application/policies.py - Project Governance
apps/platform-api/src/platform_api/modules/projects/service.py - Project Repository
apps/platform-api/src/platform_api/modules/projects/repository.py - Model Catalog
apps/platform-api/src/platform_api/modules/runtime_catalog/application/service.py - Service Accounts
apps/platform-api/src/platform_api/modules/service_accounts/service.py - Audit
apps/platform-api/src/platform_api/modules/audit - Runtime Gateway
apps/platform-api/src/platform_api/modules/runtime_gateway/application/service.py - LangGraph Adapter
apps/platform-api/src/platform_api/adapters/langgraph/runtime_client.py
Agent Execution
- Runtime Service
apps/runtime-service/src/runtime_service - Runtime Resolver
apps/runtime-service/src/runtime_service/runtime/resolver.py - Agent Graphs
apps/runtime-service/src/runtime_service/graphs - Tools and MCP
apps/runtime-service/src/runtime_service/tools - Run State
apps/runtime-service
Agent Workspace
- Workspace UI
apps/platform-web/src/components/workspace - Workspace Runtime API
apps/runtime-service/src/runtime_service/http/workspace.py - DeerFlow Capabilities
apps/runtime-service/src/runtime_service/services/dearflow_agent
Other components
- Platform User
- LLM and MCP Services
Connections 24
- Platform User → Chat Session: starts chat
- Chat Session → Session Service: loads and submits
apps/platform-web/src/modules/chat/composables/useChatSession.ts - Session Service → Platform API: sends requests
- Platform API → Request Context: installs middleware
apps/platform-api/src/platform_api/main.py - Platform API → Runtime Gateway: routes requests
- Runtime Gateway → LangGraph Adapter: uses client
apps/platform-api/src/platform_api/modules/runtime_gateway/application/service.py - Runtime Gateway → Model Catalog: assembles model settings
apps/platform-api/src/platform_api/modules/runtime_gateway/application/service.py - Runtime Gateway → IAM Policies: applies authorization
- Project Governance → IAM Policies: checks policies
apps/platform-api/src/platform_api/modules/projects/service.py - Project Governance → Project Repository: reads and writes
apps/platform-api/src/platform_api/modules/projects/service.py - Service Accounts → IAM Policies: checks permissions
apps/platform-api/src/platform_api/modules/service_accounts/service.py - Service Accounts → Project Repository: checks project grants
apps/platform-api/src/platform_api/modules/service_accounts/service.py - Platform API → Audit: records requests
apps/platform-api/src/platform_api/main.py - LangGraph Adapter → Runtime Service: forwards runtime calls
- Runtime Service → Runtime Resolver: resolves execution
apps/runtime-service/src/runtime_service/runtime/auth.py - Runtime Resolver → Agent Graphs: selects graph
- Agent Graphs → Tools and MCP: invokes tools
- Agent Graphs → LLM and MCP Services: requests model or MCP
- Agent Graphs → Run State: persists run state
- Runtime Service → Session Service: streams run events
- Workspace UI → Workspace Runtime API: browses workspace
- DeerFlow Capabilities → Workspace Runtime API: uses sandbox workspace
- DeerFlow Capabilities → Tools and MCP: provides agent tools
- DeerFlow Capabilities → Run State: stores task and governance data
apps/runtime-service/src/runtime_service/services/dearflow_agent/external_task_storage.py