Skip to main content

Overview

Knowledge Stack’s AI assistant is powered by a fleet of stateless agents that can search your knowledge base, process information, and stream responses in real time. Each agent invocation is independent and self-contained — no state persists between conversations.

Key Properties

How It Works

When you send a message to the AI assistant, the following sequence occurs:
  1. You send a message via POST /v1/threads/{id}/run
  2. The API returns immediately with 202 Accepted and a workflow_id
  3. An agent worker picks up the task from the queue
  4. The agent retrieves context — your thread history and any memory documents you have configured
  5. The agent processes your request, potentially searching your knowledge base or using other tools
  6. Responses stream in real time via SSE (Server-Sent Events) as the agent generates them
  7. The final message is saved to your thread

Performance Targets

Agent Capabilities

What Agents Can Do

Agents have access to a focused set of tools for working with your knowledge base:

What Agents Cannot Do

By design, agents have a restricted scope:
  • Agents can read from your knowledge base and write to threads only
  • Agents cannot modify documents, folders, or any other content
  • Agents cannot access external networks or services beyond the knowledge base and LLM provider

Memory Documents

You can influence agent behavior by providing memory documents — regular documents in your knowledge base that are injected as context for the agent’s system prompt. This means you can:
  • Give the agent domain-specific instructions
  • Define response formatting guidelines
  • Provide background context that the agent should always consider
Changes to memory documents take effect on the next agent invocation — no redeployment needed.

Streaming Responses

Agent responses are streamed in real time using Server-Sent Events (SSE). See the Real-Time Notifications documentation for details on connecting to the streaming endpoint and handling events.

Security

Agent execution includes multiple layers of security:

Configuration

If you are self-hosting Knowledge Stack, you can configure the agent system:

Scaling