AgentStack Commands API
Protein commands: POST /api/commands/execute, batch, dna/{entity}/{op}. Same execution stack as MCP tools commands.execute / commands.execute_batch. Logic Engine client commands may appear here too.
Protein commands: POST /api/commands/execute, batch, dna/{entity}/{op}. Same execution stack as MCP tools commands.execute / commands.execute_batch. Logic Engine client commands may appear here too.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/agentstack-tech:agentstack-tech-commands-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: AgentStack Core Commands API
description: 'AgentStack is a Universal Processing System — a patented AI-first platform that replaces an entire backend stack and ships a ready admin UI. One ecosystem covers auth, payments, data, social, messenger, AI, knowledge base, game economy, RBAC and more — behind a single SDK, REST API and Model Context Protocol surface. You say the outcome. An AI with AgentStack connected hosts, configures, and reads the result back. Free tier from $0.
**Two layers:** (1) **Universal access** — `POST /mcp` (`agentstack.execute`), `GET /mcp/actions`, `GET /mcp/discovery`; `GET/POST /api/dna/data` (8DNA key-value); `POST /api/commands/*` (Protein, same stack as MCP `commands.execute`). (2) **REST compatibility** — many `/api/*` routes for SPA, SDK, OAuth, webhooks, uploads. See repo doc `docs/API_CHANNELS_AND_PROTOCOLS.md`.
**Channels:** Prefer MCP (`POST /mcp`, `GET /mcp/actions`), 8DNA (`/api/dna/data`), and Protein commands (`/api/commands/*`) for new integrations. REST paths below are the compatibility surface for SPA, SDKs, OAuth, and uploads. See `/api-docs`, `/mcp-docs`, and docs/API_CHANNELS_AND_PROTOCOLS.md.
**Try it:** Use Authorize with `X-API-Key` or Bearer JWT. Changelog: docs/api/API_CHANGELOG.md.'
version: 0.4.24
x-agentstack-version: 0.4.24
x-genetic-tag: docs.api.specs.gen1
x-changelog-url: docs/api/API_CHANGELOG.md
x-exported-at: '2026-11-01T04:40:16Z'
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: Commands
description: 'Protein commands: POST /api/commands/execute, batch, dna/{entity}/{op}. Same execution stack as MCP tools commands.execute / commands.execute_batch. Logic Engine client commands may appear here too.'
paths:
/api/commands/execute:
post:
tags:
- Commands
summary: Execute Command
description: 'Execute a single protein command
Surgical Operations Pattern
- POST = Create and execute command
- Returns structured response (Philosophy v0.1.2)'
operationId: execute_command_api_commands_execute_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/protein_commands__router__CommandRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/protein_commands__router__CommandResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'429':
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
x-channel: rest_compat
/api/commands/dna/{entity_type}/{operation}:
post:
tags:
- Commands
summary: Execute Dna Operation
description: 'Execute DNA CRUD operation using protein commands
Surgical Operations Pattern
- POST = Create and execute DNA operation'
operationId: execute_dna_operation_api_commands_dna__entity_type___operation__post
parameters:
- name: entity_type
in: path
required: true
schema:
type: string
title: Entity Type
- name: operation
in: path
required: true
schema:
type: string
title: Operation
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
title: Data
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/protein_commands__router__CommandResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'429':
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
x-channel: rest_compat
/api/commands/batch:
post:
tags:
- Commands
summary: Execute Batch Commands
description: 'Execute multiple protein commands in batch
Protein Command Architecture
- Batch processing for efficiency
- Parallel or sequential execution
- One managed-organism cell per batch (see COMMAND_BATCH_ORGANISM_* env)'
operationId: execute_batch_commands_api_commands_batch_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BatchCommandRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BatchCommandResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'429':
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
x-channel: rest_compat
/api/commands/status/{command_uuid}:
get:
tags:
- Commands
summary: Get Command Status
description: 'Get command execution status
Data Response Principle
- Always return structured response'
operationId: get_command_status_api_commands_status__command_uuid__get
parameters:
- name: command_uuid
in: path
required: true
schema:
type: string
title: Command Uuid
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/protein_commands__router__CommandResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'429':
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
x-channel: rest_compat
/api/commands/history:
get:
tags:
- Commands
summary: Get Command History
description: 'Get command execution history
Data Response Principle
- Always return structured response'
operationId: get_command_history_api_commands_history_get
parameters:
- name: limit
in: query
required: false
schema:
type: integer
default: 100
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
default: 0
title: Offset
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/protein_commands__router__CommandResponse'
title: Response Get Command History Api Commands History Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'429':
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
x-channel: rest_compat
/api/commands/entities/{entity_type}:
get:
tags:
- Commands
summary: Get Entities
description: 'Get entities using protein commands (convenience endpoint)
Elegant Minimalism
- Simple interface for common operations'
operationId: get_entities_api_commands_entities__entity_type__get
parameters:
- name: entity_type
in: path
required: true
schema:
type: string
title: Entity Type
requestBody:
content:
application/json:
schema:
anyOf:
- type: object
additionalProperties: true
- type: 'null'
title: Filters
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/protein_commands__router__CommandResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'429':
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
x-channel: rest_compat
post:
tags:
- Commands
summary: Create Entity
description: 'Create entity using protein commands (convenience endpoint)
Elegant Minimalism
- Simple interface for common operations'
operationId: create_entity_api_commands_entities__entity_type__post
parameters:
- name: entity_type
in: path
required: true
schema:
type: string
title: Entity Type
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
title: Data
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/protein_commands__router__CommandResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'429':
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
x-channel: rest_compat
/api/commands/health:
get:
tags:
- Commands
summary: Health Check
description: 'Health check endpoint for protein command API
Data Response Principle
- Always return structured response'
operationId: health_check_api_commands_health_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'422':
description: Unprocessable Entity
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'429':
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
x-channel: rest_compat
/api/command:
post:
tags:
- Commands
summary: Execute Command
description: 'Execute a client command
Commands are processed through Logic Engine command handlers.
Supports wildcard triggers (e.g., "action.*").
Command format: category.action
Examples:
- check.daily_reward
- action.draw_card
- game.level_up
- shop.purchase
- reward.claim
Args:
request: Command request with command string and data
current_user: Authenticated user context
Returns:
Command execution results'
operationId: execute_command_api_command_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/endpoints__command_endpoints__CommandRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/endpoints__command_endpoints__CommandResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'401':
description: Unauthorized
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'429':
description: Too Many Requests
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
'500':
description: Internal Server Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
x-channel: rest_compat
components:
schemas:
BatchCommandResponse:
properties:
success:
type: boolean
title: Success
total_commands:
type: integer
title: Total Commands
successful_commands:
type: integer
title: Successful Commands
failed_commands:
type: integer
title: Failed Commands
results:
items:
$ref: '#/components/schemas/protein_commands__router__CommandResponse'
type: array
title: Results
total_execution_time_ms:
type: number
title: Total Execution Time Ms
type: object
required:
- success
- total_commands
- successful_commands
- failed_commands
- results
- total_execution_time_ms
title: BatchCommandResponse
description: Response model for batch commands (Philosophy v0.1.2)
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
endpoints__command_endpoints__CommandRequest:
properties:
command:
type: string
title: Command
data:
additionalProperties: true
type: object
title: Data
default: {}
type: object
required:
- command
title: CommandRequest
description: Request model for executing a command
BatchCommandRequest:
properties:
commands:
items:
$ref: '#/components/schemas/protein_commands__router__CommandRequest'
type: array
title: Commands
execute_parallel:
type: boolean
title: Execute Parallel
default: true
fail_fast:
type: boolean
title: Fail Fast
default: false
type: object
required:
- commands
title: BatchCommandRequest
description: Request model for batch commands
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
endpoints__command_endpoints__CommandResponse:
properties:
success:
type: boolean
title: Success
command:
type: string
title: Command
handlers_matched:
type: integer
title: Handlers Matched
results:
items: {}
type: array
title: Results
timestamp:
type: string
title: Timestamp
error:
anyOf:
- type: string
- type: 'null'
title: Error
type: object
required:
- success
- command
- handlers_matched
- results
- timestamp
title: CommandResponse
description: Response model for command execution
ProblemDetails:
type: object
description: RFC 7807 Problem Details (+ AgentStack trace_id).
required:
- title
- status
properties:
type:
type: string
format: uri
default: about:blank
description: URI reference identifying the problem type.
title:
type: string
description: Short, human-readable summary of the problem type.
status:
type: integer
minimum: 100
maximum: 599
description: HTTP status code for this occurrence.
detail:
type: string
description: Human-readable explanation specific to this occurrence.
instance:
type: string
format: uri
description: URI reference identifying this specific occurrence.
trace_id:
type: string
description: AgentStack request/trace correlation id (X-Trace-Id).
protein_commands__router__CommandResponse:
properties:
success:
type: boolean
title: Success
command_uuid:
type: string
title: Command Uuid
status:
type: string
title: Status
result:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Result
error:
anyOf:
- type: string
- type: 'null'
title: Error
execution_time_ms:
anyOf:
- type: number
- type: 'null'
title: Execution Time Ms
warnings:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Warnings
type: object
required:
- success
- command_uuid
- status
title: CommandResponse
description: Response model for protein commands (Philosophy v0.1.2)
protein_commands__router__CommandRequest:
properties:
command_type:
type: string
title: Command Type
command_name:
type: string
title: Command Name
payload:
additionalProperties: true
type: object
title: Payload
priority:
type: integer
title: Priority
default: 5
timeout_ms:
type: integer
title: Timeout Ms
default: 30000
retry_count:
type: integer
title: Retry Count
default: 3
type: object
required:
- command_type
- command_name
- payload
title: CommandRequest
description: Request model for protein commands
parameters:
IdempotencyKey:
name: Idempotency-Key
in: header
required: false
description: Client-generated key to make mutating requests idempotent.
schema:
type: string
maxLength: 256
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: User session JWT from /auth/login.
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: 'Project API key. Optional service_caps whitelist is enforced before RBAC. See /dev/docs/secure/api-keys-scopes. OAuth 2.1 Device Code (RFC 8628) for plugins: see /oauth/device/code — documented in docs, not as a non-standard OAS flow.'
x-tagGroups:
- name: Unified access
tags:
- MCP
- 8DNA API
- Commands
- name: Field access policy
tags:
- DataAccess
- name: Identity & access
tags:
- Authentication
- User
- Profile
- Sessions
- RBAC
- Permissions
- OAuth 2.1
- API Keys
- name: Project platform
tags:
- Projects
- Project
- CRM
- Business
- Integrations
- Agents Fleet
- Support
- Bots
- Dashboard
- Notifications
- name: Commerce
tags:
- Payments
- AgentNet
- Commerce
- Commerce Shop
- Commerce Merchant
- Marketplace
- Assets
- Global Assets
- Invoices
- Buffs
- name: Automation
tags:
- Logic Engine
- Logic Templates
- Commands
- Scheduler
- Webhooks
- Unified API
- name: Data & AI
tags:
- 8DNA API
- RAG
- Neural Architecture
- Neural Events
- AI Builder
- Files
- Project Files
- Hosting
- name: Ops
tags:
- Health & Metrics
- Admin
- Analytics
- Backup Management
- OAuth 2.1 Admin
- Observability
- OpTrace
- API Hub
- name: Fabric & platform
tags:
- Fabric
- Capabilities
- Sandbox
- Shell Hub
- Platform
- Discovery
- Guidance
- Ecosystem
- name: Social & AgentNet
tags:
- AgentSocial
- AgentNet
- AgentNet PTR
- AgentNet BNB
- AgentNet Solana
- AgentNet Arbitrum
- AgentNet Chain Control
- AgentNet Chain Control Public
- name: Public surfaces
tags:
- Public hosting
- Public demo hosting
- Public showcase
- Public grants
- Public commerce lite
- name: Finance & billing
tags:
- Finance
- Billing
- Business
- PrincipalAccess