One platform to replace your CRM, ERP, HR system, project tracker, support desk, and the rest of your business software.
Traditional business software is mostly data, rules, and workflows hidden behind dozens of separate interfaces. In an agent-first company, those interfaces are no longer the center of work—your AI agents are. AgentSync gives every agent one shared, self-hosted system of record where the business lives: customers, deals, employees, projects, tickets, inventory, finances, and anything else you choose to model.
The flow is simple:
- Build your business once. Deploy ready-made CRM, HR, project management, support, finance, and inventory Blueprints—or describe a custom operation in plain English and let an agent model it.
- Connect every agent to one place. Give any MCP-capable agent (Claude Desktop, Cursor, Cline, Continue, OpenClaw, and more) the same AgentSync URL. Each agent immediately understands the data and business rules available to it.
- Run the company through conversation. People ask their agents to qualify a lead, hire an employee, update a project, resolve a ticket, or reconcile inventory. The agents do the work directly in AgentSync instead of sending people through another app.
- Let agents coordinate through shared data. A closed deal can become an onboarding project; a support issue can inform the customer record; a new hire can trigger equipment and access tasks. Every agent works from the same live context without brittle point-to-point integrations.
- Keep control. Role-based permissions, workflow constraints, field-level provenance, and a complete audit trail govern who can see or change what—and show exactly what happened, when, and why.
Instead of paying for a growing stack of disconnected systems and stitching them together forever, AgentSync turns your business into one programmable operating layer that any agent can use. One source of truth. One connection per agent. Any business workflow.
🚧 Alpha software. APIs and schemas may change between 0.x releases. Track CHANGELOG.md. Not yet recommended for unattended production use.
If you are an agent (or pointing one at this server), read SKILL.md — a single self-contained guide to install, connect, set up, and operate AgentSync end-to-end. Every running deployment also serves it live at <your-base-url>/skill.md, so you can tell a teammate's agent: "go to https://agentsync.acme.com/skill.md" and it will pick up everything from there.
- One MCP URL — paste it into any agent. The agent triggers the standard OAuth flow on first use; users see a familiar browser sign-in.
- Schema-first data model — tables, fields with types and constraints, state-machine transitions, and field-level provenance (
who,when,confidence). - Multi-tenant, multi-workspace — Postgres RLS keyed per team; one server hosts many teams.
- Built-in blueprints — CRM, HR, PM, support, finance, inventory; one-click deploy. Or describe your business in plain English and have AgentSync draft a custom blueprint.
- Web UI for non-technical users — table view with inline edit, undo, provenance sidebar, schema browser, blueprint gallery, member invites.
- Operator kit — Docker Compose, Helm chart, OIDC SSO, pluggable email (Resend/SMTP/SES), domain allowlist, super-admin console.
git clone https://github.com/amrshawqy/agentsync.git
cd agentsync
pnpm install
docker compose -f docker/docker-compose.yml up -d
pnpm db:migrate
pnpm build
pnpm --filter @agentsync/server dev
# in another terminal:
pnpm --filter @agentsync/web devThen open http://localhost:3001, sign in, and copy the MCP URL from /connect into your AI agent.
For self-hosting in production, see docs/deploy/DEPLOY.md.
Most teams run multiple disconnected apps while their agents have fragmented context and inconsistent permissions. AgentSync centralizes:
- Data model and schema evolution
- Access control and tenant isolation
- Audit and provenance
- Multi-agent coordination via events
- Blueprint-based business system deployment
- Multi-tenant team/workspace/table architecture
- Schema-first model with constraints, validation, and hints for agents
- Field-level provenance (
who,when,confidence) - Event system (SSE + webhooks + subscription management)
- Blueprint marketplace and one-command blueprint deployment
- Agent Kit generation for common agent platforms
- OAuth + JWT auth for API and MCP access
- Agent-native onboarding:
- Agent key challenge registration
- Team creation and invite acceptance
- Optional email verification via OTP (Resend)
agentsync/
├── packages/
│ ├── types/ # Shared zod schemas and TypeScript types
│ ├── db/ # Drizzle schema, migrations, seeders
│ ├── server/ # API + MCP server + business services
│ └── sdk/ # Typed JavaScript/TypeScript SDK
├── blueprints/ # Built-in blueprints (crm, hr, pm, support, ...)
├── docker/ # Local Postgres + Redis setup
├── docs/ # Vision, product spec, architecture docs
└── scripts/ # Helper scripts
- Runtime: Node.js 20+
- Language: TypeScript
- API: Hono
- MCP:
@modelcontextprotocol/sdk - Database: PostgreSQL 16 + Drizzle ORM
- Cache/Streams: Redis 7
- Validation: Zod
- Build: pnpm + Turborepo
- Tests: Vitest
- Node.js 20+
- pnpm 9+
- Docker Desktop
pnpm installdocker compose -f docker/docker-compose.yml up -dpnpm db:migrate
pnpm db:seedpnpm buildpnpm --filter @agentsync/server devServer defaults:
- REST API:
http://localhost:3000/v1 - MCP endpoint:
http://localhost:3000/mcp - Health:
http://localhost:3000/health
Use .env.example as baseline.
Important variables:
DATABASE_URLREDIS_URLJWT_SECRETPUBLIC_BASE_URLOAUTH_CLIENT_IDOAUTH_CLIENT_SECRETRESEND_API_KEY(optional in local)EMAIL_FROM(required if sending OTP emails)
Onboarding and limits:
UNVERIFIED_MAX_TEAMSUNVERIFIED_MAX_INVITES_PER_DAYVERIFIED_MAX_INVITES_PER_DAYEMAIL_OTP_EXPIRY_MINUTESEMAIL_OTP_MAX_ATTEMPTS
This is the intended SaaS-style flow:
- Agent calls
POST /v1/auth/agent/challengewith public JWK. - Agent signs challenge locally, then calls
POST /v1/auth/agent/register. - Agent receives onboarding token.
- Agent creates team with
POST /v1/teams(creator becomes admin). - Admin agent invites members via
POST /v1/teams/:teamId/invites. - Invited user/agent accepts with
POST /v1/teams/invites/accept. - Optional: account email verification via OTP:
POST /v1/auth/email/startPOST /v1/auth/email/verify
- Admin deploys blueprint (e.g. CRM) and starts operations.
Use this guide if you are an end-user with an AI agent (for example OpenClaw) and you want your agent to do all setup actions for you.
Open:
You should see an ok status.
In OpenClaw MCP settings:
- Add MCP server URL: http://localhost:3000/mcp
- Add API base URL: http://localhost:3000
Tell your agent:
- "Create my AgentSync account using agent-key registration."
Under the hood, the agent will:
- Call
POST /v1/auth/agent/challenge - Sign challenge with its key
- Call
POST /v1/auth/agent/register - Save returned access token
Tell your agent:
- "Check my AgentSync profile."
Agent calls:
GET /v1/auth/me
Local link:
- http://localhost:3000/v1/auth/me (token required)
Tell your agent:
- "Create a team named Acme Sales with slug acme-sales."
Agent calls:
POST /v1/teams
This creates the team and makes your account team admin.
Local link:
- http://localhost:3000/v1/teams (token required)
Tell your admin agent:
- "Invite user1@company.com and user2@company.com as members."
Agent calls:
POST /v1/teams/{teamId}/invites
Agent receives invite codes/links to share.
Each invited person does:
- Connect their own agent to AgentSync (same MCP URL).
- Agent creates their account (same step 2).
- Agent accepts invite:
POST /v1/teams/invites/acceptwith invite code.
Tell your agent:
- "Start email verification for me@company.com"
- After you receive OTP: "My OTP is 123456"
Agent calls:
POST /v1/auth/email/startPOST /v1/auth/email/verify
Local links:
Tell your admin agent:
- "Deploy CRM for this team."
Agent calls:
POST /v1/blueprints/crm/deploy
Then you can tell the agent:
- "List CRM tables."
- "Create contact John Smith, john@acme.com."
- "Create company Acme Inc."
- "Create deal for Acme in Lead stage."
After setup, team agents can:
- Create/query/update CRM records
- Subscribe to events
- Trigger automations
- Operate within role-based permissions
- Health: http://localhost:3000/health
- MCP endpoint: http://localhost:3000/mcp
- Teams: http://localhost:3000/v1/teams
- Auth profile: http://localhost:3000/v1/auth/me
- Blueprints: http://localhost:3000/v1/blueprints
- No end-user dashboard UI yet (current flow is agent/API-driven).
- Invite links are generated, but no built-in
/invite/...web page flow yet. - OTP delivery requires Resend configuration (
RESEND_API_KEY,EMAIL_FROM).
Point your MCP client to:
https://<your-host>/mcp
MCP provides tools for:
- Data CRUD and querying
- Schema and workspace operations
- Events and subscriptions
- Member/role administration
- Blueprint deployment and marketplace
- Audit/provenance queries
- Agent onboarding lifecycle
Public / mixed onboarding:
GET /healthPOST /oauth/tokenPOST /oauth/device/authorizePOST /oauth/device/verifyPOST /v1/auth/agent/challengePOST /v1/auth/agent/registerPOST /v1/auth/tokenGET /v1/auth/mePOST /v1/auth/email/startPOST /v1/auth/email/verify
JWT-protected application APIs:
/v1/records/*/v1/schema/*/v1/workspaces/*/v1/members/*/v1/teams/*/v1/blueprints/*/v1/events/*/v1/agent-kit/*/v1/automations/*/v1/audit/*
# Lint/test/build
pnpm test
pnpm build
# Per package
pnpm --filter @agentsync/server test
pnpm --filter @agentsync/server typecheck
pnpm --filter @agentsync/db migrate
pnpm --filter @agentsync/db seed- Unit and integration tests: Vitest
- MCP tool behavior tests included in
packages/server/test/mcp - Recommended pre-push check:
pnpm test && pnpm build- Team-level tenant boundaries are enforced at API and DB layers
- Role permissions are applied per workspace/table/field/record
- JWT includes team/user/role context for authorization
- OTP flow is rate-limited and attempt-bound
- Build server package and run
node packages/server/dist/index.js - Provide managed Postgres and Redis for production
- Set secure
JWT_SECRETand properPUBLIC_BASE_URL - Configure Resend for email verification and invite delivery
- Deploy — Docker Compose and Helm
- Environment variables
- Backup & restore
- Upgrade
- Security
MIT