Phase Index
This document provides an authoritative index of all phases, their deliverables, locked decisions, and key artifacts.Phase 6.7: Unified Agent Creation & Bulk Bootstrap
Status: ✅ Complete (commit8b1e537)
What Shipped
- Backend: Orchestrated agent create endpoint (
POST /api/v1/admin/agent-profiles/create) - Backend: Idempotency-Key header support for UUIDv4 bootstrap path
- Frontend:
CreateAgentModalcomponent for single agent creation - Frontend:
BulkBootstrapModalcomponent for CSV/table bulk import - BigQuery: Idempotency table (
config_agent_profile_idempotency)
Key Files
api/routes/admin.py- Unified endpoint implementationapi/schemas/agent_profile_orchestrated.py- Request/response schemasapi/bigquery/phase4_profile_queries.py- Idempotency + helper functionsintegration/bigquery/sql/tables/config_agent_profile_idempotency.sql- DDLapi/tests/test_admin_agent_profiles_create.py- Backend testsdashboard/src/features/agentMapping/components/CreateAgentModal.tsx- Single agent UIdashboard/src/features/agentMapping/components/BulkBootstrapModal.tsx- Bulk import UIdashboard/src/features/agentMapping/api/agentMappingClient.ts- API client methodsdashboard/src/features/agentMapping/api/types.ts- TypeScript typesdashboard/src/features/agentMapping/views/ProfilesView.tsx- Integration view
Locked Decisions
- Backend owns all UUID generation: No client-side UUID generation for
agent_entity_id- UUIDv5 (deterministic) when
agent_idprovided:uuid5(namespace, tenant_id|org_id|agent_id) - UUIDv4 (bootstrap) when
agent_idomitted
- UUIDv5 (deterministic) when
- Orchestrated create endpoint: Single endpoint (
POST /api/v1/admin/agent-profiles/create) orchestrates identity + contact creation - Idempotency-key usage: Only for UUIDv4 bootstrap path + heal scenarios (not required for UUIDv5 deterministic path)
- Retry semantics: Use
agent_entity_idparameter in request to reuse existing identity (no duplicate creation) - Org/tenant scoping: Enforced everywhere; cross-org requests return generic NOT_FOUND (no leak)
References
- Checkpoint Document:
PHASE_6_7_CHECKPOINT.md- Full API contract, smoke tests, verification steps - BigQuery DDL:
integration/bigquery/sql/tables/config_agent_profile_idempotency.sql - Backend Tests:
api/tests/test_admin_agent_profiles_create.py - Deployment Guide:
docs/DEPLOYMENT.md- Manual deploy instructions forpayroll-backend-prod - Audit Notes:
docs/reference/AUDIT_NOTES_AGENT_CREATION.md- Invariants, failure modes, verification checklist
Service Routing
- Config Plane (
payroll-pipeline-cbs): Rate Plans, versions, rule authoring - System of Record (
payroll-backend-prod): Agent identities, assignments, execution/audit - Phase 6.7 endpoint routes to System of Record (
payroll-backend-prod)
Previous Phases
Phase 6.5: Identity Resolve Bridge
Status: ✅ Complete- Purpose: UI-accessible Identity Resolve bridge for admins
- What it unlocks: Resolve legacy or new agent_id deterministically, generate/reuse agent_entity_id, seed identity
- Implementation: Service layer helper (
api/services/identity_seed.py), endpoint/api/v1/admin/identity/resolve
Next Phases
Phase 7A: No-Code Data Onboarding
Status: 📋 Planned (scaffold:PHASE_7A_KICKOFF.md)
- Scope: Multi-source commission file onboarding, upload → validate → header mapping → stage snapshot → “ready for run”
- Approach: Presigned upload workflow
- Reference:
PHASE_7A_KICKOFF.md- Scope, tables, endpoints, security invariants, smoke tests