Overview
Acontext provides a powerful API for building AI agents with persistent context, semantic search, and self-learning capabilities. The API is organized around REST principles and returns JSON responses.REST API
RESTful endpoints with predictable URLs
OpenAPI 3.0
Full OpenAPI specification available
Multi-format Support
OpenAI, Anthropic, and native formats
Client SDKs
Python and TypeScript libraries
Base URLs
Authentication
All API requests require authentication using a Bearer token. Include your project API key in theAuthorization header:
Client Libraries
Install the official SDKs to get started quickly:Python SDK
Full-featured Python client with async support
TypeScript SDK
Type-safe TypeScript/JavaScript client
Quick Start
Here’s a complete example to get you started:Core Concepts
Spaces
Spaces
Knowledge spaces store structured information with semantic search capabilities. Each space can contain pages, folders, and content blocks organized hierarchically.
Sessions
Sessions
Sessions represent conversation threads with message history. Sessions can be connected to spaces to leverage stored knowledge during interactions.
Blocks
Blocks
Blocks are the building units of knowledge: pages, folders, text blocks, and SOPs (Standard Operating Procedures). Blocks support rich properties and nested structures.
Disks
Disks
Disks provide isolated storage groups for organizing multiple knowledge bases within a project.
Tools
Tools
Tools define capabilities that AI agents can use. The API allows managing and renaming tools across your project.
API Resources
Disks
Manage storage groups
Sessions
Handle conversations and messages
Spaces
Create and search knowledge bases
Blocks
Manage content structure
Tools
Configure agent capabilities
Search
Semantic and agentic search
Message Format Support
Acontext supports multiple message formats for maximum compatibility:- OpenAI - Compatible with OpenAI Chat Completion format (default)
- Anthropic - Compatible with Anthropic Messages format
- Acontext - Native format with extended capabilities
format parameter.