How tungvoc3199/anh-duong-ai-coworker works
Ánh Dương AI Coworker Core is a Python service that prepares user requests and supports durable, asynchronous workflow execution. The main path classifies a request, selects a capability, gathers persona and project/task context, then exposes a prepared result; execution proceeds separately through task planning, policy and approval checks, and a background worker. State, audit, visual tooling, and evaluation are supporting capabilities. The graph follows the sampled pipeline, API, worker, and integration excerpts; several subsystem links are omitted where wiring was not shown.
Main entry points: worker.py Background worker · pipeline.py Request pipeline · async_tasks.py Async tasks API · prepared_requests.py Prepared requests API
Components 24
API and integration
- FastAPI app
app/main.py - Prepared requests API
app/api/prepared_requests.py - Async tasks API
app/api/async_tasks.py - OpenClaw integration
integrations/openclaw-anh-duong-core/index.js
Request preparation
- Request pipeline
app/orchestration/pipeline.py - Fast router
app/routing/fast_router.py - Capability router
app/capabilities/router.py - Context builder
app/context_builder/builder.py - Persona loader
app/persona/loader.py
Workflow execution
- Async task service
app/async_tasks/service.py - Background worker
app/async_tasks/worker.py - Workflow planning
app/planning/planner.py - Policy engine
app/policy/engine.py - Approval service
app/approvals/service.py
State and governance
- Project service
app/projects/service.py - Task service
app/tasks/service.py - Audit writer
app/audit/writer.py - SQLite database
app/db/session.py
Product capabilities
- Memory retrieval
app/memory/retrieval.py - OpenClaw executor
app/openclaw/executor.py - VisualForge client
app/visualforge/client.py - Evaluation service
app/evaluation/service.py
Other components
- User / caller
- OpenClaw gateway
Connections 26
- User / caller → Prepared requests API: submits request
- Prepared requests API → Request pipeline: prepares request
- Request pipeline → Fast router: routes text
- Request pipeline → Capability router: selects capability
- Request pipeline → Persona loader: loads persona
- Request pipeline → Context builder: builds context
- Request pipeline → Project service: reads project
- Request pipeline → Task service: reads task
- Request pipeline → Audit writer: writes events
- Context builder → Memory retrieval: retrieves context
- User / caller → Async tasks API: submits or manages run
- Async tasks API → Async task service: creates or resolves run
- Async tasks API → SQLite database: reads and writes
- FastAPI app → Background worker: starts worker
- Background worker → Workflow planning: plans workflow
- Background worker → Policy engine: checks actions
- Background worker → Approval service: handles approvals
- Background worker → Task service: updates task
- Background worker → SQLite database: persists run state
- Background worker → Audit writer: records events
- Background worker → OpenClaw executor: executes actions
- OpenClaw executor → OpenClaw gateway: dispatches execution
- Background worker → VisualForge client: invokes visual work
- OpenClaw integration → Prepared requests API: requests preparation
- OpenClaw integration → Async tasks API: creates and polls runs
- Evaluation service → SQLite database: reads run data