How arena-position2/p2-sim works
Sim is a workspace for building, deploying, and managing AI agents and workflows. The main user journey is to create a workflow visually, conversationally, or in code; connect models and integrations; execute it; then inspect activity or use it through chat. Files, knowledge, tables, and scheduled tasks are additional workspace capabilities. The README documents these product areas, while the sampled source shows execution, uploads, diffs, and realtime room managers. Many cross-subsystem links are therefore shown as unverified rather than asserted as inspected call paths.
Main entry points: engine.ts Execution engine · workflow-block-view.tsx Workflow editor · query_database.ts Integration tools · diff-engine.ts Workflow diffs
Components 19
Workflow authoring
- Workflow editor
packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx - Workflow diffs
apps/sim/lib/workflows/diff/diff-engine.ts - Workflow model
packages/workflow-types/src/workflow.ts
Agent execution
- Execution engine
apps/sim/executor/execution/engine.ts - Integration tools
apps/sim/tools/notion/query_database.ts - Code integrations
apps/sim/blocks/blocks/codepipeline.ts - Scheduled tasks
apps/sim
Workspace data
- File storage
apps/sim/lib/uploads/core/storage-service.ts - Knowledge sync
apps/sim/lib/knowledge/connectors/sync-engine.ts - Workspace tables
apps/sim
User surfaces
- Run resume UI
apps/sim/app/(interfaces)/resume/[workflowId]/[executionId]/resume-page-client.tsx - Agent chat
apps/sim/app/(interfaces)/chat/[identifier]/chat.tsx - Run monitoring
apps/sim/app/(landing)/components/features/components/logs-callout/logs-callout.tsx
Platform services
- Realtime rooms
apps/realtime/src/rooms/redis-manager.ts - PostgreSQL data
packages/db/db.ts - OAuth credentials
apps/sim/lib/mcp/oauth/storage.ts - Browser preferences
apps/sim/lib/core/utils/browser-storage.ts
Other components
- Workspace user
- Models and services
Connections 19
- Workspace user → Workflow editor: creates workflows
README.md - Workspace user → Agent chat: uses agent chat
README.md - Workflow editor → Workflow diffs: edits state
- Workflow editor → Workflow model: authors workflows
- Workflow diffs → Workflow model: updates model
- Workflow editor → Execution engine: starts runs
- Execution engine → Integration tools: invokes tools
- Execution engine → Code integrations: runs code
- Execution engine → Run resume UI: provides run state
- Workspace user → File storage: uploads files
README.md - File storage → Knowledge sync: supplies documents
- Workspace user → Workspace tables: manages data
README.md - Scheduled tasks → Execution engine: triggers runs
- Workspace user → Run monitoring: inspects activity
README.md - Execution engine → Realtime rooms: publishes updates
- Execution engine → PostgreSQL data: persists run data
- Integration tools → OAuth credentials: uses credentials
- Integration tools → Models and services: calls services
- Workspace user → Browser preferences: keeps preferences