Honcho Sessions API

The sessions API from Honcho — 5 operation(s) for sessions.

GitHub OpenAPI

Operations 7

GET /v1/apps/{app_id}/users/{user_id}/sessions Get Session #
POST /v1/apps/{app_id}/users/{user_id}/sessions Create Session #
POST /v1/apps/{app_id}/users/{user_id}/sessions/list Get Sessions #
PUT /v1/apps/{app_id}/users/{user_id}/sessions/{session_id} Update Session #
DELETE /v1/apps/{app_id}/users/{user_id}/sessions/{session_id} Delete Session #
POST /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat Chat #
GET /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/clone Clone Session #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/honcho-dev:honcho-dev-sessions-api"
All apis
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.

Get an API 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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

honcho-dev-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Honcho Sessions API
  summary: The Identity Layer for the Agentic World
  description: Honcho is a platform for giving agents user-centric memory and social cognition
  contact:
    name: Plastic Labs
    url: https://honcho.dev/
    email: hello@plasticlabs.ai
  version: 1.1.0
servers:
- url: http://localhost:8000
  description: Local Development Server
- url: https://demo.honcho.dev
  description: Demo Server
- url: https://api.honcho.dev
  description: Production SaaS Platform
tags:
- name: Sessions
paths:
  /v1/apps/{app_id}/users/{user_id}/sessions:
    get:
      tags:
      - Sessions
      summary: Get Session
      description: 'Get a specific session for a user.


        If session_id is provided as a query parameter, it uses that (must match JWT session_id).

        Otherwise, it uses the session_id from the JWT.'
      operationId: get_session_v1_apps__app_id__users__user_id__sessions_get
      security:
      - HTTPBearer: []
      - {}
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the app
          title: App Id
        description: ID of the app
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the user
          title: User Id
        description: ID of the user
      - name: session_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID to retrieve. If not provided, uses JWT
          title: Session Id
        description: Session ID to retrieve. If not provided, uses JWT
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: JavaScript
        source: "import Honcho from 'honcho-ai';\n\nconst client = new Honcho({\n  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const session = await client.apps.users.sessions.get('app_id', 'user_id');\n\n  console.log(session.id);\n}\n\nmain();"
      - lang: Python
        source: "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n    api_key=os.environ.get(\"HONCHO_API_KEY\"),  # This is the default and can be omitted\n)\nsession = client.apps.users.sessions.get(\n    user_id=\"user_id\",\n    app_id=\"app_id\",\n)\nprint(session.id)"
    post:
      tags:
      - Sessions
      summary: Create Session
      description: Create a Session for a User
      operationId: create_session_v1_apps__app_id__users__user_id__sessions_post
      security:
      - HTTPBearer: []
      - {}
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the app
          title: App Id
        description: ID of the app
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the user
          title: User Id
        description: ID of the user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionCreate'
              description: Session creation parameters
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: JavaScript
        source: "import Honcho from 'honcho-ai';\n\nconst client = new Honcho({\n  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const session = await client.apps.users.sessions.create('app_id', 'user_id');\n\n  console.log(session.id);\n}\n\nmain();"
      - lang: Python
        source: "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n    api_key=os.environ.get(\"HONCHO_API_KEY\"),  # This is the default and can be omitted\n)\nsession = client.apps.users.sessions.create(\n    user_id=\"user_id\",\n    app_id=\"app_id\",\n)\nprint(session.id)"
  /v1/apps/{app_id}/users/{user_id}/sessions/list:
    post:
      tags:
      - Sessions
      summary: Get Sessions
      description: Get All Sessions for a User
      operationId: get_sessions_v1_apps__app_id__users__user_id__sessions_list_post
      security:
      - HTTPBearer: []
      - {}
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the app
          title: App Id
        description: ID of the app
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the user
          title: User Id
        description: ID of the user
      - name: reverse
        in: query
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          description: Whether to reverse the order of results
          default: false
          title: Reverse
        description: Whether to reverse the order of results
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number
          default: 1
          title: Page
        description: Page number
      - name: size
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Page size
          default: 50
          title: Size
        description: Page size
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/SessionGet'
              - type: 'null'
              description: Filtering and pagination options for the sessions list
              title: Options
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_Session_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: JavaScript
        source: "import Honcho from 'honcho-ai';\n\nconst client = new Honcho({\n  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  // Automatically fetches more pages as needed.\n  for await (const session of client.apps.users.sessions.list('app_id', 'user_id')) {\n    console.log(session.id);\n  }\n}\n\nmain();"
      - lang: Python
        source: "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n    api_key=os.environ.get(\"HONCHO_API_KEY\"),  # This is the default and can be omitted\n)\npage = client.apps.users.sessions.list(\n    user_id=\"user_id\",\n    app_id=\"app_id\",\n)\npage = page.items[0]\nprint(page.id)"
  /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}:
    put:
      tags:
      - Sessions
      summary: Update Session
      description: Update the metadata of a Session
      operationId: update_session_v1_apps__app_id__users__user_id__sessions__session_id__put
      security:
      - HTTPBearer: []
      - {}
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the app
          title: App Id
        description: ID of the app
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the user
          title: User Id
        description: ID of the user
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the session to update
          title: Session Id
        description: ID of the session to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionUpdate'
              description: Updated session parameters
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: JavaScript
        source: "import Honcho from 'honcho-ai';\n\nconst client = new Honcho({\n  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const session = await client.apps.users.sessions.update('app_id', 'user_id', 'session_id', {\n    metadata: { foo: 'bar' },\n  });\n\n  console.log(session.id);\n}\n\nmain();"
      - lang: Python
        source: "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n    api_key=os.environ.get(\"HONCHO_API_KEY\"),  # This is the default and can be omitted\n)\nsession = client.apps.users.sessions.update(\n    session_id=\"session_id\",\n    app_id=\"app_id\",\n    user_id=\"user_id\",\n    metadata={\n        \"foo\": \"bar\"\n    },\n)\nprint(session.id)"
    delete:
      tags:
      - Sessions
      summary: Delete Session
      description: Delete a session by marking it as inactive
      operationId: delete_session_v1_apps__app_id__users__user_id__sessions__session_id__delete
      security:
      - HTTPBearer: []
      - {}
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the app
          title: App Id
        description: ID of the app
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the user
          title: User Id
        description: ID of the user
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the session to delete
          title: Session Id
        description: ID of the session to delete
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: JavaScript
        source: "import Honcho from 'honcho-ai';\n\nconst client = new Honcho({\n  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const session = await client.apps.users.sessions.delete('app_id', 'user_id', 'session_id');\n\n  console.log(session);\n}\n\nmain();"
      - lang: Python
        source: "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n    api_key=os.environ.get(\"HONCHO_API_KEY\"),  # This is the default and can be omitted\n)\nsession = client.apps.users.sessions.delete(\n    session_id=\"session_id\",\n    app_id=\"app_id\",\n    user_id=\"user_id\",\n)\nprint(session)"
  /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/chat:
    post:
      tags:
      - Sessions
      summary: Chat
      description: Chat with the Dialectic API
      operationId: chat_v1_apps__app_id__users__user_id__sessions__session_id__chat_post
      security:
      - HTTPBearer: []
      - {}
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the app
          title: App Id
        description: ID of the app
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the user
          title: User Id
        description: ID of the user
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the session
          title: Session Id
        description: ID of the session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DialecticOptions'
              description: Dialectic Endpoint Parameters
      responses:
        '200':
          description: Response to a question informed by Honcho's User Representation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DialecticResponse'
            text/event-stream: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: JavaScript
        source: "import Honcho from 'honcho-ai';\n\nconst client = new Honcho({\n  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const dialecticResponse = await client.apps.users.sessions.chat('app_id', 'user_id', 'session_id', {\n    queries: 'string',\n  });\n\n  console.log(dialecticResponse.content);\n}\n\nmain();"
      - lang: Python
        source: "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n    api_key=os.environ.get(\"HONCHO_API_KEY\"),  # This is the default and can be omitted\n)\ndialectic_response = client.apps.users.sessions.chat(\n    session_id=\"session_id\",\n    app_id=\"app_id\",\n    user_id=\"user_id\",\n    queries=\"string\",\n)\nprint(dialectic_response.content)"
  /v1/apps/{app_id}/users/{user_id}/sessions/{session_id}/clone:
    get:
      tags:
      - Sessions
      summary: Clone Session
      description: Clone a session, optionally up to a specific message
      operationId: clone_session_v1_apps__app_id__users__user_id__sessions__session_id__clone_get
      security:
      - HTTPBearer: []
      - {}
      parameters:
      - name: app_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the app
          title: App Id
        description: ID of the app
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the user
          title: User Id
        description: ID of the user
      - name: session_id
        in: path
        required: true
        schema:
          type: string
          description: ID of the session to clone
          title: Session Id
        description: ID of the session to clone
      - name: message_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Message ID to cut off the clone at
          title: Message Id
        description: Message ID to cut off the clone at
      - name: deep_copy
        in: query
        required: false
        schema:
          type: boolean
          description: Whether to deep copy metamessages
          default: false
          title: Deep Copy
        description: Whether to deep copy metamessages
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: JavaScript
        source: "import Honcho from 'honcho-ai';\n\nconst client = new Honcho({\n  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const session = await client.apps.users.sessions.clone('app_id', 'user_id', 'session_id');\n\n  console.log(session.id);\n}\n\nmain();"
      - lang: Python
        source: "import os\nfrom honcho import Honcho\n\nclient = Honcho(\n    api_key=os.environ.get(\"HONCHO_API_KEY\"),  # This is the default and can be omitted\n)\nsession = client.apps.users.sessions.clone(\n    session_id=\"session_id\",\n    app_id=\"app_id\",\n    user_id=\"user_id\",\n)\nprint(session.id)"
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    SessionGet:
      properties:
        filter:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Filter
        is_active:
          type: boolean
          title: Is Active
          default: false
      type: object
      title: SessionGet
    Page_Session_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Session'
          type: array
          title: Items
        total:
          type: integer
          minimum: 0
          title: Total
        page:
          type: integer
          minimum: 1
          title: Page
        size:
          type: integer
          minimum: 1
          title: Size
        pages:
          type: integer
          minimum: 0
          title: Pages
      type: object
      required:
      - items
      - total
      - page
      - size
      title: Page[Session]
    DialecticOptions:
      properties:
        queries:
          anyOf:
          - type: string
          - items:
              type: string
            type: array
          title: Queries
        stream:
          type: boolean
          title: Stream
          default: false
      type: object
      required:
      - queries
      title: DialecticOptions
    Session:
      properties:
        id:
          type: string
          title: Id
        is_active:
          type: boolean
          title: Is Active
        user_id:
          type: string
          title: User Id
        app_id:
          type: string
          title: App Id
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          default: {}
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
      - id
      - is_active
      - user_id
      - app_id
      - created_at
      title: Session
    SessionCreate:
      properties:
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          default: {}
      type: object
      title: SessionCreate
    DialecticResponse:
      properties:
        content:
          type: string
          title: Content
      type: object
      required:
      - content
      title: DialecticResponse
    SessionUpdate:
      properties:
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
      type: object
      required:
      - metadata
      title: SessionUpdate
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer