Tools API
The Tools Library provides agentic capabilities for your AI applications. Add web search, document retrieval (RAG), and conversation memory with a single API.Available Tools
| Tool | Description | Availability |
|---|---|---|
| Web Search | Real-time web search with AI-optimized results | All tiers |
| Documents/RAG | Upload and query documents with semantic search | Pro+ |
| Memory | Persistent conversation context across sessions | Pro+ |
Web Search
Search the web in real-time with AI-optimized results.Endpoint
Request
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Search query |
max_results | integer | 5 | Maximum results to return (1-10) |
search_depth | string | ”basic” | Search depth: basic or advanced |
include_domains | string[] | - | Only include results from these domains |
exclude_domains | string[] | - | Exclude results from these domains |
Response
Pricing
| Tier | Cost per Search |
|---|---|
| Starter | $0.015 |
| Pro | $0.012 |
| Growth | $0.011 |
| Team | $0.01 |
Documents / RAG
Upload documents and query them with semantic search. Perfect for building knowledge bases, FAQ bots, and document Q&A.Upload Document
| Parameter | Type | Description |
|---|---|---|
filename | string | Original filename |
content | string | Base64-encoded file content or plain text |
content_type | string | MIME type (application/pdf, text/plain, text/markdown) |
collection | string | Collection name (default: “default”) |
metadata | object | Custom metadata for filtering |
processing- Being chunked and embeddedready- Available for searchfailed- Processing failed (checkerror_message)
Query Documents
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Search query |
collection | string | ”default” | Collection to search |
top_k | integer | 5 | Maximum results |
threshold | number | 0.3 | Minimum similarity score (0-1) |
List Documents
Delete Document
Document Limits by Tier
| Tier | Documents | Storage | Collections |
|---|---|---|---|
| Pro | 500 | 1 GB | 10 |
| Growth | 5,000 | 10 GB | 50 |
| Team | 50,000 | 100 GB | 500 |
| Enterprise | 500,000 | 1 TB | 5,000 |
Memory / Context
Persist conversation context across sessions. The AI remembers previous interactions without you managing conversation history.Using Memory with Chat
Addsession_id to your chat requests to enable memory:
| Parameter | Type | Description |
|---|---|---|
session_id | string | Unique session identifier |
memory.enabled | boolean | Enable memory for this request |
memory.include_last_n | integer | Include last N messages from memory |
Memory Management
List Sessions:Memory Limits by Tier
| Tier | Memory Tokens | Sessions | Retention |
|---|---|---|---|
| Pro | 100,000 | 100 | 30 days |
| Growth | 500,000 | 1,000 | 90 days |
| Team | 2,000,000 | 10,000 | 1 year |
| Enterprise | 10,000,000 | 100,000 | 2 years |
Auto-Summarization
When a session approaches its token limit, Perf automatically:- Summarizes older messages
- Preserves recent messages intact
- Continues conversation with summary + recent context
Combining Tools
Tools work together seamlessly. For example, search the web, store relevant information in documents, and use memory to maintain context:Pricing Summary
| Tool | Pricing Model |
|---|---|
| Web Search | Per search ($0.01-0.015) |
| Documents | Per embedding token |
| Memory | Included in tier |
Plan Availability
| Feature | Starter | Pro | Growth | Team | Enterprise |
|---|---|---|---|---|---|
| Web Search | Yes | Yes | Yes | Yes | Yes |
| Documents/RAG | - | Yes | Yes | Yes | Yes |
| Memory | - | Yes | Yes | Yes | Yes |
Related
- Chat API - Core chat endpoint with tool integration
- Streaming API - Real-time responses with tools
- Policies API - Control tool usage with policies