Documentation
Developer documentation and API reference for building with Yohanun
Getting Started
Core Features
API Reference
Resources
Welcome to Yohanun
Yohanun is a semantic runtime that gives your applications persistent memory, automated reasoning, and contextual intelligence. While others build chatbots, you'll build genuinely intelligent applications.
The Yohanun Difference
Rules + Memory = Experience. Yohanun doesn't just store dataβit understands context, remembers relationships, and spots patterns that make your applications feel like they "just get it."
Quick Start
Get your first intelligent application running in under 5 minutes:
Using Claude Code? The fastest route is Yohanun Guilds β persistent, access-governed memory for your coding agents; one copy-paste prompt and your agent sets itself up.
1. Get Your API Key
- Register for a developer account
- Generate an API key in your dashboard
- Note your API key for use in requests:
2. Make Your First Request
Memory app (the default β your AI, our memory): store something, then find it again by meaning:
Chat app (Yohanun runs the model β needs a chat-type key, see app types):
What the API automatically provides:
-
π€
Intelligent Response: AI-powered conversational responses
-
π―
Intent Detection: Automatically categorizes user intent
-
π§
Memory Storage: Stores conversation context for future use
-
βοΈ
Model Selection: Uses best available AI model for the task
Authentication
All API requests require authentication using your API key in the request header:
Secure by Design
API keys use SHA-256 hashing and include automatic rate limiting, cost controls, and usage tracking.
Multi-App Support
Create separate API keys for different applications with isolated contexts and independent usage tracking.
App types: what your key can call
Every app (and its key) has a type, chosen when you create it under Applications. The type decides which parts of the API the key can reach β enforced before any request is processed.
Memory app (bring your own AI)
The memory & governance surface: /api/memory, /api/threads,
/api/documents*, /api/learning, and the access-control reads.
Your own model does the talking; Yohanun remembers and enforces.
Not included: /api/ai/* and /api/agent/* β
calls to them return 403 app type does not include this endpoint.
This is the key the Guilds kit uses.
Chat app (Yohanun runs inference)
The full surface, including /api/ai/chat, streaming, WebSocket chat and the
agent runtime β metered, or bring your own provider keys. Everything a memory app can
call, plus the AI runtime sections below.
Examples in the AI Runtime, WebSocket and Rules sections below need a chat app key. Everything under Threads, Memory System and Documents works with either type.
Intelligent Processing
Yohanun's intelligent processing capabilities go beyond simple AI responses to provide context-aware, memory-enhanced, and temporally intelligent interactions.
Processing Features
Intent Detection
Every message is automatically analyzed to determine user intent, enabling appropriate responses and triggering relevant automations.
Common Intents
Information Requests
Questions, queries, help requests
Task Execution
Commands, actions, operations
Support Issues
Problems, complaints, escalations
Example Response
Entity Extraction
Automatically identifies and extracts relevant entities from user messages including dates, names, locations, products, and custom business entities.
| Entity Type | Examples | Use Cases |
|---|---|---|
| PERSON | John Smith, Alice Cooper | User identification, personalization |
| DATE_TIME | tomorrow, next week, 3pm | Scheduling, reminders |
| PRODUCT | Pro Plan, API Credits | Sales, support routing |
| LOCATION | New York, Europe, Building A | Routing, localization |
Context Awareness
Yohanun maintains rich context throughout conversations, understanding references, follow-up questions, and conversational flow.
Context Types
-
π¬
Conversational Context: Previous messages, topics discussed, references
-
π€
User Context: Preferences, history, profile information
-
π’
Application Context: Business rules, workflows, current state
-
β°
Temporal Context: Time-based relevance, session boundaries
Temporal Intelligence
Advanced time-aware processing that understands "this morning", "earlier today", "last week" and automatically boosts relevant memories based on temporal proximity.
Example: Thread Reactivation
When resuming a conversation after 2 days, Yohanun automatically detects the gap, retrieves relevant context from that timeframe, and provides seamless continuity.
Temporal Features
Memory Decay
Older memories naturally fade while recent interactions remain highly relevant
Session Boundaries
Automatic detection of conversation starts/stops for better context management
Time References
Natural language time processing: "this morning", "last Tuesday", "an hour ago"
Relevance Boosting
Recently discussed topics receive higher relevance scores in memory search
Real-Time WebSocket API
The Yohanun WebSocket API provides real-time streaming AI chat with live processing visibility, bidirectional communication, and enterprise-grade scaling. Experience word-by-word AI responses and instant feedback.
WebSocket Features
WebSocket Endpoints
/ws/chat
Main WebSocket chat endpoint
Full AI integration with streaming responses and live processing updates
/ws/chat/test
Interactive test page
Browser-based WebSocket testing and debugging interface
/ws/chat/stats
Connection statistics
Real-time connection monitoring and health metrics
Quick Start
1. Connect and Authenticate
2. Send Chat Messages
3. Handle Real-Time Responses
Message Types Reference
Client β Server Messages
Authentication
Chat Message
Control Messages
Server β Client Messages
Authentication Response
Live Processing Updates
Streaming AI Response
Rate Limiting & Performance
WebSocket Limits
- Sustained Rate: 60 messages/minute
- Burst Rate: 10 messages/10 seconds
- Max Connections: 1000 per container
- Heartbeat: 30-second intervals
Performance Features
- Auto-scaling: Container-aware load balancing
- Failover: Redis-coordinated redundancy
- Monitoring: Real-time connection statistics
- Health Checks: Automatic connection monitoring
Code Examples
Python WebSocket Client
Node.js WebSocket Client
Testing & Monitoring
Interactive Testing
Use the built-in test page for interactive WebSocket testing:
https://app.yohanun.com/ws/chat/test
Connection Statistics
Monitor WebSocket connections and performance:
Error Handling Best Practices
- Authentication Timeout: Authenticate within 10 seconds of connection
- Rate Limiting: Handle rate limit responses gracefully with exponential backoff
- Connection Loss: Implement reconnection logic with jitter to prevent thundering herd
- Message Validation: Always validate message structure before sending
AI Runtime API
The core AI Runtime API provides intelligent conversation capabilities with advanced features including intent detection, temporal memory integration, rule management, and multi-model support.
AI Runtime Features
/api/ai/chat
Primary AI chat endpoint
Intelligent Chat Processing
The main AI endpoint that processes messages with full context, memory integration, and intelligent response generation.
Request Format
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| message | string | β Yes | The user's message to process |
| context | object | No | Additional context for processing |
| model | string | No | AI model to use (overrides app default) |
| system_prompt | string | No | Custom system instructions |
| thread_id | string | No | Conversation thread identifier |
| session_id | string | No | Session within thread |
| user_id | string | No | User identifier for isolation |
| memory_context | array | No | Memory search contexts |
Response Format
Response Fields
| Field | Type | Description |
|---|---|---|
| response | string | Generated AI response |
| intent | string | Detected user intent |
| entities | object | Extracted entities from message |
| model_used | string | Actual AI model used |
| rule_detection | object | Rule creation opportunities |
| temporal_context | object | Thread reactivation and memory info |
/api/ai/chat-stream
Streaming AI chat endpoint
Server-Sent Events (SSE) Streaming
Identical to the regular chat endpoint but returns streaming responses using Server-Sent Events. Perfect for real-time applications without WebSocket complexity.
Request Format
Streaming Response
/api/ai/detect-intent
Intent detection only
Intent Detection
Extract intent and entities from user messages without generating a response. Useful for routing and classification tasks.
Response
/api/ai/generate-response
Response generation
Response Generation
Generate natural language responses based on detected intent and entities. Useful for building custom conversation flows.
Response
Thread Management API
Manage conversation threads for persistent, contextual interactions. Threads maintain conversation history and enable temporal memory features.
/api/threads/
Create new thread
Create Thread
Response
/api/threads/{thread_id}/messages
Get thread history
Retrieve Thread Messages
Response
/api/threads/
List user threads
List Threads
Response
Persistent Memory System
Yohanun's memory system stores and retrieves contextual information across sessions, building understanding that makes your applications genuinely intelligent.
/api/memory/memories
Store contextual memory
Store Contextual Memory
Store information that builds understanding over time. Memories are automatically embedded and indexed for semantic search.
Response
Optional access labels on create:
user_id (user-level isolation), acl_owners (personal memory β
returns only to those principals), acl_matter + acl_classification
(compartment and level 0β3, enforced by the read gate).
/api/memory/search
Search memories
Search Memory
Semantic search across stored memories with context filtering and relevance scoring.
context (singular) filters to one context;
omit it to search everything your key can see. Results run the full retrieval path β
temporal decay, ranking, and the access gate β so relevance is already applied to the
ordering; there is no min_relevance parameter.
Response
/api/memory/stats
Memory statistics
Memory Statistics
Response
Rules Engine API
Create and manage intelligent automation rules that trigger actions based on conversation patterns, user behavior, and contextual conditions.
/api/ai/create-rule
Create automation rule
Create Rule
Create intelligent automation rules using natural language. The AI analyzes your instruction and creates appropriate triggers and actions.
Response
/api/rules/
List all rules
List Rules
Response
Database Service API
Managed database instances optimized for AI workloads with automated backups, monitoring, and scaling. Deploy PostgreSQL instances with vector search capabilities.
Database Features
/api/database-service/instances
Create database instance
Create Database Instance
Deploy a managed PostgreSQL instance with AI optimizations and automated configuration.
Request Format
Response
/api/database-service/instances
List database instances
List Database Instances
Response
/api/database-service/instances/{instance_id}/metrics
Get performance metrics
Database Metrics
Real-time performance metrics including CPU, memory, storage, and AI-specific query performance.
Response
/api/database-service/templates
Get database templates
Database Templates
Pre-configured database templates optimized for different use cases.
AI Optimized
Vector search, similarity matching, AI workloads
- β’ pgvector extension
- β’ pg_trgm for text search
- β’ Optimized for embeddings
Analytics
Reporting, aggregations, time-series data
- β’ pg_stat_statements
- β’ pg_partman for partitioning
- β’ Enhanced query performance
Basic
General purpose applications
- β’ uuid-ossp extension
- β’ Standard PostgreSQL
- β’ Cost-effective option
Backup Management
Create Manual Backup
List Backups
Automated Backups
All database instances include automated daily backups with 30-day retention. Point-in-time recovery available for the last 7 days.
Error Handling
Understand standard error responses and implement robust error handling in your applications.
Standard Error Format
All API errors follow a consistent format with HTTP status codes and detailed error information.
Common Error Codes
| HTTP Status | Error Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Missing required parameters or invalid format |
| 401 | AUTHENTICATION_FAILED | Invalid or missing API key |
| 403 | INSUFFICIENT_PERMISSIONS | API key lacks required permissions |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests - rate limit exceeded |
| 500 | INTERNAL_SERVER_ERROR | Unexpected server error |
Error Handling Best Practices
- Implement Retry Logic: Use exponential backoff for rate limits and temporary failures
- Log Request IDs: Include request_id in error logs for debugging
- Handle Gracefully: Show user-friendly messages while logging technical details
- Monitor Error Rates: Track error patterns to identify systemic issues
Integration Guide
Get started integrating Yohanun into your applications using direct API calls or our code examples.
REST API Integration
The Yohanun platform uses standard REST APIs that work with any HTTP client in any programming language.
Python Example
JavaScript Example
WebSocket Integration
For real-time applications, use our WebSocket API for streaming responses.
SDK Development
We're currently developing official SDKs for Python, JavaScript, and other popular languages. In the meantime, the REST and WebSocket APIs provide full functionality for any HTTP client.
Interested in contributing? Contact us about SDK development opportunities.
More Examples
Find comprehensive code examples throughout this documentation:
- β’ AI Runtime API - Chat and streaming examples
- β’ WebSocket API - Real-time integration examples
- β’ Memory System - Context and memory management
- β’ Rules Engine - Automation and rule creation
- β’ Troubleshooting - Debug examples and solutions
Document Processing API
Upload, process, and search documents with intelligent chunking, relationship mapping, and semantic understanding.
/api/documents-qdrant/upload
Upload document
Upload Document
Upload documents for intelligent processing with semantic chunking and relationship mapping.
user_id is required. Optional access labels:
matter (compartment, default public), classification
(0β3), owners (comma-separated identities β makes it a personal document,
visible only to those principals).
Response
/api/documents-qdrant/search
Search documents
Search Documents
Form-encoded, not JSON. user_id is an
optional ownership filter. Document chunks also surface automatically in
/api/memory/search and chat memory context β this endpoint is for
document-only search.
Response
/api/documents/
List documents
List Documents
Response
Memory Lifecycle & Governance APIs
Memories are never edited or deleted β they are closed (retired from retrieval, still readable by id) or superseded (replaced by a successor that inherits context, tags and access labels unless overridden).
Further platform surfaces (full reference in the interactive API docs):
/api/access/*β clearances, compartments, ownership keys, mandates & human escalations (the governance core)/api/agreements/*β negotiated agreements between two principals, mandate-gated and co-signed/api/agent/runβ the bounded agent runtime over policied memory/api/learning/outcomeβ report outcomes; lessons become retrievable and ranking adapts
Support & Resources
Troubleshooting
Common issues and solutions to help you debug and resolve problems quickly.
Common Issues
Authentication Failed
Error: "Valid API key required for this endpoint"
- Check your API key format: should start with "sile_"
- Ensure API key is in the X-API-Key header
- Verify your API key is active in the developer dashboard
- Check for typos or extra spaces in the API key
Rate Limit Exceeded
Error: "Rate limit exceeded - too many requests"
- Implement exponential backoff in your retry logic
- Check the rate limit headers in the response
- Consider upgrading your plan for higher limits
- For WebSocket: max 60 msgs/min, 10 burst/10sec
WebSocket Connection Issues
Error: Connection drops or authentication timeout
- Authenticate within 10 seconds of connecting
- Implement reconnection logic with jitter
- Handle heartbeat messages properly
- Check WebSocket URL format: wss://app.yohanun.com/ws/chat
Memory Search Returns No Results
Issue: Memory search returns empty results
- Check if memories are stored with correct contexts
- Verify memory_context array in your requests
- Allow time for embedding processing to complete
- Try broader search terms or lower relevance threshold
Debug Steps
1. Check API Health
2. Test WebSocket Statistics
3. Verify API Key Format
4. Test Basic Chat Request
Performance Tips
Memory Context Optimization
- β’ Use specific context arrays to limit search scope
- β’ Implement user-specific contexts: "private:user_123"
- β’ Consider temporal search for conversation references
- β’ Limit memory results to 10-15 for best performance
Thread Management
- β’ Create threads once and reuse them
- β’ Use thread_id for automatic message storage
- β’ Implement thread cleanup for long-running sessions
- β’ Consider session_id for sub-conversations
Getting Help
If you're still experiencing issues after trying these troubleshooting steps:
- β’ Include your request_id from error responses
- β’ Provide the exact error message and HTTP status code
- β’ Share the minimal code that reproduces the issue
- β’ Check the code examples for reference implementations