Core · Service · Active scaffold
platform-agent-service
Core service for asynchronous agent execution requests, persisting execution state, orchestrating MCP tool calls around AI generations and delivering callbacks to source products.
- TypeScript
- NestJS 11
- Prisma
- PostgreSQL
- BullMQ
- Redis
- AJV
- @platform/contracts-agent
Spec sheet
Boundary
Core / Agent execution
Runtime
NestJS 11 HTTP service plus BullMQ processor
Default port
3600
Proxy host
http://agent.cs.lvh.me:8080
Persistence
Dedicated agent-postgres via DATABASE_URL
Queue
BullMQ on Redis
Responsibilities
- Accept product-owned agent execution requests through an internal service-to-service API.
- Persist lifecycle state from QUEUED/RUNNING to terminal execution statuses.
- Dispatch model work through platform-mcp-service, optionally execute allowlisted MCP tools, and validate output against the requested schema.
- Send completion or failure callbacks to the originating product backend.
Interfaces and contract surface
- GET /health
- POST /internal/agent/executions
- GET /internal/agent/executions/:executionId
Consumers
Dependencies and external touchpoints
- platform-mcp-service
- @platform/contracts-agent
- Agent Postgres
- Redis
Notes
- Tool-backed executions require an explicit toolPolicy allowlist from the consuming product.
- Terminal statuses include completed, skipped by policy/duplicate/model, failed and callback failed.
Source references
platform-agent-service/package.jsonplatform-agent-service/prisma/schema.prismaplatform-agent-service/src/modules/agent-executions