Skip to main content
Most documentation lives outside the product and treats every reader the same. Autonomy lets you change that. By running documentation agents inside your app, you can give users answers that reflect who they are, what they are trying to do, and where they are in the product. Here is an example, the following voice enabled agents are powered by Autonomy. Give it a try, ask it anything about Autonomy, type below or click the microphone to talk: Agents, built with Autonomy, can power text and voice conversations rooted in knowledge from docs stored in Mintlify, Gitbook, or other documentation systems. They can also trigger actions in a product by invoking APIs available to them as tools defined in python. We use this exact pattern on our own website. The chat and voice experience at https://autonomy.computer#learn runs on Autonomy and connects directly to our docs stored in Mintlify.
From docs to in-product agents
This lets us tailor the experience of each visitor. Agents receive custom instructions that adapt responses for different audiences, such as developers, analysts, investors, or first-time visitors.

Make your docs come alive!

In the next few minutes you can launch an app and apis for agents that:
  • Speak answers drawn from your docs.
  • Search your docs using vector embeddings.
  • Respond fast using a two-agent delegation pattern.
  • Reload docs periodically to stay current.
  • Work through voice and text.
  • Trigger your product’s APIs to take actions.
1

Sign up and install the autonomy command.

Complete the steps to get started with Autonomy.
2

Get the example code

This will create a new directory with the complete example:
File Structure:
3

Point to your docs

Open images/main/main.py and update the INDEX_URL to point to your documentation:
images/main/main.py
The example expects an llms.txt file containing markdown links to your documentation pages. This format is common with documentation platforms like Mintlify, Gitbook, and others.
4

Deploy

Once deployed, open your zone URL in a browser to access the voice and text interface.
When a user speaks to the agent, a voice agent receives audio over a websocket and transcribes it. It speaks a brief acknowledgment (“Great question!”) and delegates the question to a primary agent, which searches a knowledge base for relevant documentation and returns a concise answer. This two-agent pattern ensures low latency while maintaining accuracy through retrieval-augmented generation.

Customize the agents

Update the instructions The agent instructions define how your agent responds. Customize these for your product:
images/main/main.py
Also update the voice agent instructions and the knowledge tool name to match your product. Tune the Knowledge Base Adjust these parameters based on your documentation size and structure:
images/main/main.py
Voice Configuration Options
Multilingual Support: The voice agent can detect and transcribe speech in multiple languages. If a user speaks in German, for example, the system may transcribe and respond in German automatically. To control this behavior, add language instructions to your agent configuration — either enforcing English responses by default or enabling intentional multilingual support.
Adding Filesystem Tools (Optional) For large documentation sets where semantic search alone may not provide complete context, you can add filesystem tools as a fallback. This gives the agent direct access to read complete documentation files.
images/main/main.py
Update the instructions to guide the agent on when to use each tool:
images/main/main.py
See Filesystem access for more on filesystem tools and visibility options.

Learn how it works

Loading Documentation The example downloads documentation from URLs and loads them into the knowledge base:
images/main/main.py
The add_document method fetches the content from the URL and indexes it for semantic search. Voice Agent Delegation The voice agent uses a two-step pattern for low-latency responses:
images/main/main.py
This ensures users hear immediate feedback while the primary agent retrieves accurate information. Starting the Agent The agent is configured with voice capabilities and the knowledge tool:
images/main/main.py
Auto-Refresh The example periodically reloads documentation to stay current:
images/main/main.py
You can also trigger a manual refresh via the HTTP endpoint:

Add it to your product

Autonomy automatically provides APIs and streaming infrastructure for every agent you create. This makes is simple to integrate the agents that you created above into your product. HTTP API — Every agent gets HTTP endpoints out of the box:
WebSocket API — Voice agents get WebSocket endpoints for real-time audio streaming:
/dev/null/example.js
Multitenancy — You can isolate conversations per user with scope and conversation parameters. Each combination gets its own Context and Memory:
/dev/null/example.js
The example includes a complete voice and text UI in index.html that you can adapt for your product. Here are the key parts: WebSocket Connection Connect to the voice agent with multi-tenant isolation:
images/main/index.html
  • scope - Isolates memory per user. Each visitor gets their own conversation history.
  • conversation - Isolates memory per session. A user can have multiple separate conversations.
Audio Capture Capture microphone input and send as PCM16:
images/main/index.html
Audio Playback Play streamed audio responses with proper scheduling:
images/main/index.html
Handle Server Events Process different message types from the voice agent:
images/main/index.html
Text Chat with Streaming The example also includes text chat using the streaming HTTP API:
images/main/index.html

Learn more

Voice

Give agents the ability to listen and speak.

Knowledge bases

Give agents the ability to search a corpus of documents.

Programming Interfaces

How to create APIs for Autonomy applications.

Filesystem access

Give agents the ability to read, write, and search files.
Troubleshoot
  • Check that max_distance isn’t too strict (try 0.4 or higher).
  • Verify documents loaded successfully by checking the /refresh endpoint response.
  • Ensure the embedding model matches your content language.
  • Ensure your browser has microphone permissions.
  • Use Chrome or Edge for best WebSocket and Web Audio API support.
  • Check the browser console for WebSocket connection errors.
  • Adjust the instructions to emphasize using the search tool.
  • Increase max_results to provide more context.
  • Lower max_distance to retrieve more relevant chunks.
  • Consider adding filesystem tools for complete document access.
  • Reduce max_tokens in the model configuration.
  • Use a faster model for the primary agent.
  • Ensure your knowledge base isn’t too large.
  • Consider using size: big in your pod configuration for better performance.