Skip to main content

integration wiring

Integration Wiring Plan (for AI Assistants)

Moved from CLAUDE.md to reduce context size. Consult when working on platform integration tasks.

Most Impactful Next Steps

PriorityAreaActionRepos / location
1agent-buildkit → agent-mesh (tokens)Remove parsing of registry.yaml for GitLab tokens. Call mesh GET /v1/service-accounts/gitlab/:agentType/token. SOD violation; unblocks secure rotation.agent-buildkit: agent-orchestrator-client, webhook-agent-spawner
2agent-buildkit → agent-router (Vast.ai)Remove Vast.ai deploy/provider logic from buildkit. Route through agent-router: POST /api/v1/vastai/deploy, POST /api/v1/route.agent-buildkit: services that deploy or route to Vast.ai
3Oracle env single sourceOne canonical env template (/root/.env.local). Include: AGENT_MESH_URL, MCP_URL, GKG_URL, VASTAI_API_KEY, A2A_STREAM_URL, A2A_URL, ORACLE_HOST. Sync to NAS and GitLab CI.config-templates/ or agent-docker
4GitLab runners on OracleRegister runners on Oracle. Document job template with Oracle runner tag.gitlab_components
5A2A collector on OracleRun A2A stack on Oracle (collector:9004, stream:9005). Set A2A_URL and A2A_STREAM_URL.agent-mesh deployments; agent-docker
6agent-router mesh defaultEnsure production Oracle deploy sets AGENT_MESH_URL in env.agent-router: production-gateway-server.ts
7platform-agents Duo alignmentAlign GitLab Duo agent config with registry.yaml (21 agents).platform-agents .gitlab/duo/agents/
8Vast.ai ownershipAll Vast.ai logic in agent-router. Document whether agent-docker's vastai-* are legacy.agent-router (owner)

Wire Everything Up (7 Phases)

Phase 1: One env to rule them all

Create canonical Oracle env template. Required keys: AGENT_MESH_URL, MCP_URL, GKG_URL, A2A_URL, A2A_STREAM_URL, STUDIO_DEPLOY_TOKEN, BUILDKIT_PATH, VASTAI_API_KEY, ORACLE_HOST. Sync to NAS .env.production and GitLab CI.

Phase 2: Buildkit → mesh and router

Remove GitLab token reading from registry.yaml. Remove direct Vast.ai logic. All through mesh/router APIs.

Phase 3: Studio bridge and desktop → platform

Set MESH_URL in Studio bridge env. Set BUILDKIT_PATH and STUDIO_DEPLOY_TOKEN on Oracle. Desktop app points at https://studio.blueflyagents.com.

Phase 4: Mesh discovery and registry live

Deploy agent-mesh with discovery API and Redis TTL. Buildkit agents discover --registry-url <mesh>. OSSA workspace publish uses MESH_URL.

Phase 5: Router and A2A on Oracle

Set AGENT_MESH_URL for router. Run A2A stack on Oracle (9004/9005).

Phase 6: GitLab runners and Duo

Register runners on Oracle. Align Duo agent config with registry.yaml.

Phase 7: End-to-end verification

Verify from Mac (buildkit platform status), Agent Studio desktop (Registry + Platform status), anywhere (POST to studio API), MCP clients, A2A stream.

Who Calls Whom

  • Agent Studio → Studio bridge → mesh discovery + buildkit CLI
  • Buildkit → mesh (tokens, discovery), agent-router (Vast.ai only), MCP/GKG via env
  • OSSA workspace publish → mesh discovery
  • Router → mesh (gateway discovery), foundation-bridge/LLM providers
  • All public clients → *.blueflyagents.com (tunnel → Oracle)

Manual Steps (must do by hand)

  1. Hugging Face MCP: Set HF_TOKEN and HF_MCP_URL in Oracle /root/.env.local. SSH: flux423@oracle-platform.tailcf98b3.ts.net.
  2. Ollama on NAS: docker compose up -d for NAS unified stack. Set OLLAMA_URL=http://ollama:11434.