docs/agentfield.md
- Source: docs/agentfield.md
Imported Content
AgentField Integration Model
Execution contract
- Gateway endpoint:
POST /api/v1/execute/{agent}.{reasoner} - Request payload includes
workspaceId, optionalclientId,correlationId,callbackUrl, and freeforminput - Response returns async execution handle with
executionId
Control plane adapter
apps/gateway/src/services/agentfield-client.ts provides strict dispatch behavior:
- Dispatch forwards execution to
AGENTFIELD_URL. - Dispatch failures return
502(no gateway-side execution fallback). - Staging/production guardrails block
agentfield-mockURL usage.
Optional configuration:
AGENTFIELD_EXECUTE_PATH_TEMPLATE(default/api/v1/execute/{agent}.{reasoner})AGENTFIELD_TIMEOUT_MS(default15000)AGENTFIELD_WEBHOOK_SECRET(required whenREQUIRE_WEBHOOK_SIGNATURES=true, default in staging/prod)
Audit evidence
apps/gateway/src/services/audit.ts creates a signed audit credential per execution using payload hash + HMAC signature with key ID metadata.
Agent topology
See agents/agentfield.topology.yaml for event routing and workspace isolation assumptions.
Staging/production runtime expectation:
- AgentField control plane reachable over TLS.
- Agent execution worker/node pool deployed (not control-plane only).
- Launch catalog agents registered and visible via
GET /api/v1/agent-runtime/agents. - Queue/backpressure and worker heartbeat health surfaced via
GET /api/v1/agent-runtime/healthand/queues.
Outbox dispatcher
- Routed telemetry actions are persisted to
outbox_events. - Run
pnpm --filter @anchor/gateway worker:outboxto dispatch queued events to AgentField reasoners.
Runtime completion checks (GA gate)
Use these APIs to verify effective runtime operations:
GET /api/v1/agent-runtime/healthGET /api/v1/agent-runtime/queuesGET /api/v1/agent-runtime/failuresGET /api/v1/agent-runtime/agentsPOST /api/v1/agent-runtime/smokePOST /api/v1/agent-runtime/outbox-failures/{id}/retryPOST /api/v1/agent-runtime/job-failures/{id}/retry
Acceptance criteria:
- Control plane probe returns reachable status.
- Gateway/outbox/job worker heartbeats are fresh and not stale.
- Queue depth remains within workspace SLO.
- Failure buckets are visible and actionable with operator retry controls.
- Every launch agent appears in runtime catalog with execution counters.
- Smoke dispatch can execute one or all launch agents and persist audit evidence.
- Staging/prod overlays keep agent runtime enabled and worker min replicas > 0 for outbox/job loops.
Workflow controls:
GET /api/v1/workflow-executions/{id}for callback/evidence detail.POST /api/v1/workflow-executions/{id}/retry.POST /api/v1/workflow-executions/{id}/cancel.
Local integration profile
apps/agentfield-mockexists for local development and contract testing only.- Production deployment target is a self-hosted AgentField control plane/workers stack.
Production endpoint requirements
AGENTFIELD_URLis required in staging/production.AGENTFIELD_URLmust usehttps://in staging/production.AGENTFIELD_URLmust not targetagentfield-mock.AGENTFIELD_WEBHOOK_SECRETmust be present whenREQUIRE_WEBHOOK_SIGNATURES=true.