Reference

Architecture map

Optimal shape for this product: harness-driven agent + durable orchestrator + React for Instagram connect and run monitoring.

flowchart TB clients[Clients: Harness MCP + React UI] interface[Interface: MCP + REST + SSE] orch[Orchestrator: state · policy · runs] agent[Agent loop] model[Model adapter] tools[Skills / tools] policy[Policy gate] world[World: IG · media · files] memory[Memory + evals] clients --> interface --> orch orch --> agent agent --> model agent --> tools tools --> policy --> world orch --> memory orch -->|events| clients

Layer ownership

LayerOwnsMust never
Clients Human steering & display Own business rules or secrets
Interface Stable contracts for any client Bypass policy for convenience
Orchestrator Truth, transitions, run records Pretend to be the LLM
Agent loop Plan / act / observe within budgets Call Instagram without a gate
Model adapter Vendor-agnostic completions Leak into every skill file
Skills Structured capabilities Own DB schema or OAuth
Policy Allow / deny side effects Trust model “intent” alone

Dual client surface

MCP (any harness)

Cursor, Claude Code, scripts — interact with skills and inspect runs.

React (product ops)

Connect Instagram, approve drafts, monitor live agent activity.

Repo mapping

Today: Express + SQLite + LangChain skills + MCP skills server are the right instincts. Gaps: OpenAI-compatible model adapter, run events, wired UI, real OAuth/media/publish behind policy.