portablemind
All guides
API / Developer4 min read

Call PortableMind from your own code

Drive the platform over REST and MCP — authenticate, read/write any entity with general_crud, and discover schemas before you write.

apimcprest

Drive PortableMind from your own code or scripts — read and write any entity, list agents, launch work — over a single authenticated API. The same surface our agents use is open to you.

Authenticate

Every request carries a tenant slug + a credential (API key or per-user JWT):

curl https://www.dsiloed.com/api/v1/llm_agents \
  -H 'API-KEY: <your-key>' \
  -H 'Tenant-Id: your-tenant'

JWT instead of a key? Send Authorization: Bearer <jwt>. Same-origin browser callers need no CORS; cross-origin callers must be on the allowlist.

REST for the common things

Standard, predictable endpoints under /api/v1:

GET  /api/v1/llm_agents                 # list agents
POST /api/v1/llm_agents/:id/execute     # run one ({ additional_prompt, role_type_ids })
GET  /api/v1/projects        /api/v1/tasks
POST /api/v1/orchestration_executions   # launch a pipeline
GET  /api/v1/llm_conversations          # conversations

MCP for everything else

Point any MCP-capable client (including an LLM) at the MCP endpoint and you get the full tool catalog — the same tools the platform's own agents call:

POST /api/v1/mcp        # JSON-RPC 2.0: initialize / tools / resources

Two tools do most of the heavy lifting:

  • general_crud_tool — create / read / update / delete any model, with filters and relationships.
  • model_schema_tool — discover a model's fields, types, and associations before you write to it.

Filter the catalog with ?tools=name1,name2 or ?categories=agents,data so a client only sees what it needs.

Result

Whether you want a few REST calls in a cron job or a full MCP integration inside your own agent, it's one authenticated surface. Start with model_schema_tool to learn a model, then general_crud_tool to operate on it — no guessing field names.

Prefer a worked, end-to-end example? The accelerator portal is a complete app on these APIs, with an openapi.json contract you can generate a client from.