Apps API

Complete reference for the Apps API including deployment, management, and configuration endpoints.

Base URL

All Apps API endpoints are available at:

https://your-instance.com/api/v1/apps

Authentication

All Apps API endpoints require authentication via session cookies or API keys.

App Management

List Apps

GET /

Retrieve all applications available to the current user.

Response

{
  "apps": [
    {
      "app_id": "uuid",
      "name": "App Name",
      "slug": "app-slug",
      "description": "App description",
      "version": "1.0.0",
      "status": "active",
      "created_at": "2024-01-01T00:00:00Z"
    }
  ]
}

Get App Details

GET /{app_id}

Retrieve detailed information about a specific app.

Create App

POST /

Create a new application.

Request Body

{
  "name": "My New App",
  "slug": "my-new-app",
  "description": "A description of my app",
  "manifest_data": {...}
}

Import App from Manifest

POST /import-manifest

Import an application from a manifest file.

Update App

PATCH /{app_id}

Update an existing application.

Delete App

DELETE /{app_id}

Delete an application.

App Components

Get App Manifest

GET /{app_id}/manifest

Retrieve the complete manifest for an app.

Get App Models

GET /{app_id}/models

Retrieve all data models defined for an app.

Get App Agents

GET /{app_id}/agents

Retrieve all agents associated with an app.

Get Specific App Agent

GET /{app_id}/agents/{agent_id}

Retrieve details for a specific agent within an app.

Agent Activation

Activate Agent

POST /{app_id}/agents/{agent_id}/activate

Activate an agent within the app context.

Request Body

{
  "input_data": {
    "prompt": "Your message to the agent"
  },
  "context": {
    "chat_id": "optional-chat-id",
    "session_id": "optional-session-id"
  },
  "metadata": {
    "provider_id": "llm-provider-id",
    "temperature": 0.7,
    "max_tokens": 2048
  }
}

Get Activations

GET /{app_id}/activations

Retrieve activation history for an app.

Get Activation Details

GET /{app_id}/agents/activations/{activation_id}

Retrieve detailed information about a specific activation.

Function Execution

Execute Function

POST /{app_id}/functions/{function_id}/execute

Execute a function within the app context.

Get Function History

GET /{app_id}/functions/history

Retrieve execution history for all functions in the app.

Get Specific Function History

GET /{app_id}/functions/{function_id}/history

Retrieve execution history for a specific function.

Integration Services

Get Model Providers

GET /{app_id}/model-providers

Retrieve available LLM model providers for the app.

Get Service Providers

GET /{app_id}/service-providers

Retrieve configured OAuth service providers for the app.

Register Service Provider

POST /{app_id}/service-providers

Register a new OAuth service provider for the app.

Error Responses

All endpoints return standard HTTP status codes and JSON error responses:

{
  "detail": "Error message",
  "status_code": 400,
  "error_type": "ValidationError"
}

Common Status Codes

  • 200 OK - Request successful
  • 201 Created - Resource created successfully
  • 400 Bad Request - Invalid request data
  • 401 Unauthorized - Authentication required
  • 403 Forbidden - Access denied
  • 404 Not Found - Resource not found
  • 500 Internal Server Error - Server error