# Kastrax > Kastrax is an open-source Kotlin agent framework designed to provide the essential primitives for building AI applications. It enables developers to create AI agents with memory and tool-calling capabilities, implement deterministic LLM workflows, and leverage RAG for knowledge integration. With features like actor model integration, workflow graphs, and automated evals, Kastrax provides a complete toolkit for developing, testing, and deploying AI applications. This documentation covers everything from getting started to advanced features, APIs, and best practices for working with Kastrax's agent-based architecture. The documentation is organized into key sections: - **docs**: Core documentation covering concepts, features, and implementation details - **examples**: Practical examples and use cases demonstrating Kastrax's capabilities - **showcase**: A showcase of applications built using Kastrax Each section contains detailed markdown files that provide comprehensive information about Kastrax's features and how to use them effectively. ## EN - docs - [A2A Capabilities | Kastrax Docs](https://kastrax.ai/en/docs/a2a/a2a-capabilities): Detailed guide on defining and using capabilities in the Agent-to-Agent (A2A) protocol. - [A2A Security | Kastrax Docs](https://kastrax.ai/en/docs/a2a/a2a-security): Detailed guide on security mechanisms in the Agent-to-Agent (A2A) protocol. - [A2A Protocol Overview | Kastrax Docs](https://kastrax.ai/en/docs/a2a/overview): Overview of the Agent-to-Agent (A2A) protocol in Kastrax, detailing how agents can communicate and collaborate. - [Actor-Agent Integration | Kastrax Docs](https://kastrax.ai/en/docs/actor/actor-agent-integration-kotlin): Detailed guide on integrating Kastrax AI agents with the Actor model for building distributed, concurrent agent systems. - [Actor Model Overview | Kastrax Docs](https://kastrax.ai/en/docs/actor/overview): Overview of the Actor model in Kastrax, detailing how it provides a foundation for building distributed, concurrent, and resilient AI agent systems. - [Kastrax AI Agent Tools System | Agent Documentation | Kastrax](https://kastrax.ai/en/docs/agents/adding-tools): Comprehensive guide to implementing and using tools with Kastrax AI Agents. Learn how to create custom tools, integrate with external systems, and enhance your agents capabilities. - [Adding Voice Capabilities to Kastrax AI Agents | Agents | Kastrax Docs](https://kastrax.ai/en/docs/agents/adding-voice): Comprehensive guide to implementing voice interaction capabilities in Kastrax AI Agents, including speech synthesis, speech recognition, and real-time conversations. - [Kastrax AI Agent Memory System | Agents | Kastrax Docs](https://kastrax.ai/en/docs/agents/agent-memory): Comprehensive guide to implementing memory systems for Kastrax AI Agents, including conversation history, semantic memory, and persistent storage. - [Agent Architectures | Agent Documentation | Kastrax](https://kastrax.ai/en/docs/agents/architectures-kotlin): Overview of different agent architectures in Kastrax, including adaptive, goal-oriented, hierarchical, reflective, and creative agents. - [architectures](https://kastrax.ai/en/docs/agents/architectures) - [Integrating MCP with Kastrax AI Agents | Agents | Kastrax Docs](https://kastrax.ai/en/docs/agents/mcp-guide): Comprehensive guide to using Model Context Protocol (MCP) with Kastrax AI Agents to extend their capabilities with external tools and resources. - [Agent Monitoring and Diagnostics | Kastrax Docs](https://kastrax.ai/en/docs/agents/monitoring-kotlin): Detailed guide on monitoring and diagnosing agent performance in Kastrax, including metrics collection, performance analysis, and debugging tools. - [Creating and Using Agents | Agent Documentation | Kastrax](https://kastrax.ai/en/docs/agents/overview): Overview of agents in Kastrax, detailing their capabilities and how they interact with tools, memory, and external systems. - [Runtime Context in Kastrax AI Agents | Agents | Kastrax Docs](https://kastrax.ai/en/docs/agents/runtime-variables): Learn how to use Kastraxs powerful dependency injection system to provide runtime configuration to AI agents and tools, enabling dynamic behavior adaptation. - [Agent Versioning and State Management | Kastrax Docs](https://kastrax.ai/en/docs/agents/versioning-kotlin): Detailed guide on managing agent versions and state in Kastrax, including version creation, activation, rollback, and state persistence. - [Agent Versioning | Kastrax Docs](https://kastrax.ai/en/docs/agents/versioning): Learn how to manage different versions of your AI agents in Kastrax, including creating, testing, deploying, and rolling back agent versions. - [Discord Community and Bot | Documentation | Kastrax](https://kastrax.ai/en/docs/community/discord): Information about the Kastrax Discord community and MCP bot. - [Licensing](https://kastrax.ai/en/docs/community/licensing): Kastrax License - [KastraX Core Class | Kastrax Docs](https://kastrax.ai/en/docs/core/kastrax-class-kotlin): Documentation for the KastraX class, the core entry point for managing agents, tools, and other components in the Kastrax framework. - [Kastrax Client SDK](https://kastrax.ai/en/docs/deployment/client): Learn how to set up and use the Kastrax Client SDK for interacting with Kastrax AI Agent servers - [Deploying Kastrax Applications](https://kastrax.ai/en/docs/deployment/deployment): Learn how to deploy Kastrax AI Agent applications to various environments including cloud platforms, Kubernetes, and standalone servers - [Deployment Overview](https://kastrax.ai/en/docs/deployment/overview): Learn about different deployment options for your Kastrax applications - [Creating A Kastrax Server](https://kastrax.ai/en/docs/deployment/server): Configure and customize the Kastrax server with routing, middleware, and other options for your AI agent applications - [Create your own Eval](https://kastrax.ai/en/docs/evals/custom-eval): Kastrax allows so create your own evals, here is how. - [Overview](https://kastrax.ai/en/docs/evals/overview): Understanding how to evaluate and measure AI agent quality using Kastrax evals. - [Running in CI](https://kastrax.ai/en/docs/evals/running-in-ci): Learn how to run Kastrax evals in your CI/CD pipeline to monitor agent quality over time. - [Textual Evals](https://kastrax.ai/en/docs/evals/textual-evals): Understand how Kastrax uses LLM-as-judge methodology to evaluate text quality. - [Using with Vercel AI SDK](https://kastrax.ai/en/docs/frameworks/ai-sdk): Learn how Kastrax leverages the Vercel AI SDK library and how you can leverage it further with Kastrax - [Getting started with Kastrax and NextJS | Kastrax Guides](https://kastrax.ai/en/docs/frameworks/next-js): Guide on integrating Kastrax with NextJS. - [Creating Your First Agent | Getting Started | Kastrax Docs](https://kastrax.ai/en/docs/getting-started/first-agent-kotlin): Learn how to create your first AI agent using Kastrax, including basic configuration, memory, and tools. - [first-agent](https://kastrax.ai/en/docs/getting-started/first-agent) - [Installing Kastrax | Getting Started | Kastrax Docs](https://kastrax.ai/en/docs/getting-started/installation-kotlin): Guide on installing Kastrax and setting up the necessary prerequisites for your Kotlin project. - [Installing Kastrax | Getting Started | Kastrax Docs](https://kastrax.ai/en/docs/getting-started/installation): Guide on installing Kastrax and setting up the necessary prerequisites. - [Using with Cursor/Windsurf | Getting Started | Kastrax Docs](https://kastrax.ai/en/docs/getting-started/mcp-docs-server): Learn how to use the Kastrax MCP documentation server in your IDE to turn it into an agentic Kastrax expert. - [model-capability](https://kastrax.ai/en/docs/getting-started/model-capability) - [Introduction | Kastrax Docs](https://kastrax.ai/en/docs/getting-started/overview-kotlin): Kastrax is a Kotlin agent framework. It helps you build AI applications and features quickly with powerful primitives like agents, actors, memory, tools, and RAG. - [overview](https://kastrax.ai/en/docs/getting-started/overview) - [Kastrax AI Agent Project Structure | Getting Started | Kastrax Docs](https://kastrax.ai/en/docs/getting-started/project-structure): Guide on organizing Kastrax AI Agent projects, including best practices and recommended structures for building intelligent agent systems. - [Introduction | Kastrax Docs](https://kastrax.ai/en/docs): Kastrax is a Kotlin agent framework. It helps you build AI applications and features quickly. It gives you the set of primitives you need: workflows, agents, RAG, integrations, memory and tools. - [Using Kastrax Integrations | Kastrax Local Development Docs](https://kastrax.ai/en/docs/integrations): Documentation for Kastrax integrations, which are type-safe API clients for third-party services. - [LLM Integration | Kastrax Docs](https://kastrax.ai/en/docs/integrations/llm-integration): Learn how to integrate various Large Language Models (LLMs) with Kastrax, including DeepSeek, OpenAI, Anthropic, and Google Gemini. - [Deploying to Kastrax Cloud](https://kastrax.ai/en/docs/kastrax-cloud/deploying): GitHub-based deployment process for Kastrax applications - [Observability in Kastrax Cloud](https://kastrax.ai/en/docs/kastrax-cloud/observability): Monitoring and debugging tools for Kastrax Cloud deployments - [Kastrax Cloud ✅](https://kastrax.ai/en/docs/kastrax-cloud/overview): Deployment and monitoring service for Kastrax applications - [Setting Up a Project](https://kastrax.ai/en/docs/kastrax-cloud/setting-up): Configuration steps for Kastrax Cloud projects - [Adding Kastrax to an Existing Project | Local Development | Kastrax Docs](https://kastrax.ai/en/docs/local-dev/add-to-existing-project): Learn how to integrate Kastrax AI Agent capabilities into your existing Kotlin applications with step-by-step instructions and examples. - [Creating a New Kastrax Project | Local Development | Kastrax Docs](https://kastrax.ai/en/docs/local-dev/creating-a-new-project): Learn how to create new Kastrax AI Agent projects using the Kastrax CLI or by integrating with existing Kotlin applications. - [Inspecting Agents with `kastrax dev` | Kastrax Local Dev Docs](https://kastrax.ai/en/docs/local-dev/kastrax-dev): Learn how to use the kastrax dev command to inspect and debug your agents during development. - [implementations](https://kastrax.ai/en/docs/memory/implementations) - [memory-processors](https://kastrax.ai/en/docs/memory/memory-processors) - [Memory System Overview | Kastrax Docs](https://kastrax.ai/en/docs/memory/overview): The Kastrax memory system provides agents with the ability to remember past interactions, store important information, and retrieve relevant context. - [semantic-recall](https://kastrax.ai/en/docs/memory/semantic-recall) - [working-memory](https://kastrax.ai/en/docs/memory/working-memory) - [Logging | Kastrax Observability Documentation](https://kastrax.ai/en/docs/observability/logging): Learn how to configure and use logging in your Kastrax applications for better observability and debugging. - [Next.js Tracing | Kastrax Observability Documentation](https://kastrax.ai/en/docs/observability/nextjs-tracing): Set up OpenTelemetry tracing for Next.js applications - [Observability Overview | Kastrax Docs](https://kastrax.ai/en/docs/observability/overview): Learn about Kastraxs observability features for monitoring, analyzing, and optimizing AI agent performance. - [Tracing | Kastrax Observability Documentation](https://kastrax.ai/en/docs/observability/tracing): Set up OpenTelemetry tracing for Kastrax applications - [Document Chunking and Embedding in Kastrax | RAG | Kastrax Docs](https://kastrax.ai/en/docs/rag/chunking-and-embedding): Learn how to efficiently process, chunk, and embed documents in Kastrax for high-performance retrieval-augmented generation (RAG) applications. - [RAG System Overview | Kastrax Docs](https://kastrax.ai/en/docs/rag/overview): Overview of Retrieval-Augmented Generation (RAG) in Kastrax, detailing its capabilities for enhancing LLM outputs with relevant context. - [Retrieval in Kastrax RAG Systems | RAG | Kastrax Docs](https://kastrax.ai/en/docs/rag/retrieval): Learn how to implement advanced retrieval strategies in Kastrax RAG systems, including semantic search, metadata filtering, reranking, and hybrid retrieval approaches. - [Vector Databases in Kastrax | RAG | Kastrax Docs](https://kastrax.ai/en/docs/rag/vector-databases): Learn how to store and retrieve vector embeddings in Kastrax using various vector database options for high-performance similarity search in RAG applications. - [Storage in Kastrax | Kastrax Docs](https://kastrax.ai/en/docs/storage/overview): Overview of Kastraxs storage system and data persistence capabilities. - [Tools System Overview | Kastrax Docs](https://kastrax.ai/en/docs/tools/overview): The Kastrax tools system allows agents to interact with external systems, access data, and perform actions with type-safe interfaces. - [Voice in Kastrax | Kastrax Docs](https://kastrax.ai/en/docs/voice/overview): Overview of voice capabilities in Kastrax, including text-to-speech, speech-to-text, and real-time speech-to-speech interactions. - [Speech-to-Speech Capabilities in Kastrax | Kastrax Docs](https://kastrax.ai/en/docs/voice/speech-to-speech): Overview of speech-to-speech capabilities in Kastrax, including real-time interactions and event-driven architecture. - [Speech-to-Text (STT) in Kastrax | Kastrax Docs](https://kastrax.ai/en/docs/voice/speech-to-text): Overview of Speech-to-Text capabilities in Kastrax, including configuration, usage, and integration with voice providers. - [Text-to-Speech (TTS) in Kastrax | Kastrax Docs](https://kastrax.ai/en/docs/voice/text-to-speech): Overview of Text-to-Speech capabilities in Kastrax, including configuration, usage, and integration with voice providers. - [Control Flow in Kastrax AI Workflows | Workflows | Kastrax Docs](https://kastrax.ai/en/docs/workflows/control-flow): Learn how to orchestrate complex AI agent operations with Kastraxs powerful workflow control flow features, including sequential execution, parallel processing, branching logic, and loops. - [Dynamic Workflows in Kastrax | Workflows | Kastrax Docs](https://kastrax.ai/en/docs/workflows/dynamic-workflows): Learn how to create and execute dynamic workflows in Kastrax that adapt to runtime conditions, enabling flexible AI agent orchestration patterns. - [Error Handling in Kastrax AI Workflows | Kastrax Docs](https://kastrax.ai/en/docs/workflows/error-handling): Learn how to implement robust error handling in Kastrax AI workflows using retry mechanisms, error recovery strategies, fallback paths, and comprehensive monitoring. - [Nested Workflows in Kastrax | Workflows | Kastrax Docs](https://kastrax.ai/en/docs/workflows/nested-workflows): Learn how to create modular, reusable workflow components in Kastrax by nesting workflows within other workflows, enabling complex AI agent orchestration patterns. - [Workflow System Overview | Kastrax Docs](https://kastrax.ai/en/docs/workflows/overview-kotlin): Overview of the workflow system in Kastrax, detailing how to create, configure, and execute workflows. - [Kastrax AI Workflow System | Workflows | Kastrax](https://kastrax.ai/en/docs/workflows/overview): The Kastrax Workflow System provides a powerful framework for orchestrating complex AI agent operations with features like branching, parallel execution, resource suspension, and more. - [Runtime Variables in Kastrax AI Workflows | Kastrax Docs](https://kastrax.ai/en/docs/workflows/runtime-variables): Learn how to use Kastraxs powerful runtime variable system to dynamically configure AI workflows and agents, enabling flexible and adaptable behavior at execution time. - [Creating Steps in Kastrax AI Workflows | Kastrax Docs](https://kastrax.ai/en/docs/workflows/steps): Learn how to define and configure workflow steps in Kastrax, including agent steps, tool steps, conditional steps, and human-in-the-loop steps. - [Suspend & Resume in Kastrax AI Workflows | Human-in-the-Loop | Kastrax Docs](https://kastrax.ai/en/docs/workflows/suspend-and-resume): Learn how to implement long-running AI workflows with Kastraxs powerful suspension and resumption capabilities, enabling human-in-the-loop processes and asynchronous operations. - [Data Flow with Kastrax Workflow Variables | Kastrax Docs](https://kastrax.ai/en/docs/workflows/variables): Learn how to use Kastraxs type-safe variable system to manage data flow between workflow steps, transform values, and create dynamic AI agent workflows. - [Branching, Merging, Conditions | Workflows (vNext) | Kastrax Docs](https://kastrax.ai/en/docs/workflows-vnext/flow-control): Control flow in Kastrax (vNext) workflows allows you to manage branching, merging, and conditions to construct workflows that meet your logic requirements. - [Input Data Mapping with Workflow (vNext) | Kastrax Docs](https://kastrax.ai/en/docs/workflows-vnext/input-data-mapping): Learn how to use workflow input mapping to create more dynamic data flows in your Kastrax workflows (vNext). - [Handling Complex LLM Operations | Workflows (vNext) | Kastrax](https://kastrax.ai/en/docs/workflows-vnext/overview): Workflows (vNext) in Kastrax help you orchestrate complex sequences of operations with features like branching, parallel execution, resource suspension, and more. - [Suspend & Resume Workflows (vNext) | Human-in-the-Loop | Kastrax Docs](https://kastrax.ai/en/docs/workflows-vnext/suspend-and-resume): Suspend and resume in Kastrax vNext workflows allows you to pause execution while waiting for external input or resources. - [Using Workflows with Agents and Tools | Workflows (vNext) | Kastrax Docs](https://kastrax.ai/en/docs/workflows-vnext/using-with-agents-and-tools): Steps in Kastrax workflows (vNext) provide a structured way to manage operations by defining inputs, outputs, and execution logic. ## EN - examples - [Example: Adding Voice Capabilities | Agents | Kastrax](https://kastrax.ai/en/examples/agents/adding-voice-capabilities): Example of adding voice capabilities to Kastrax agents, enabling them to speak and listen using different voice providers. - [Example: Calling Agentic Workflows | Agents | Kastrax Docs](https://kastrax.ai/en/examples/agents/agentic-workflows): Example of creating AI workflows in Kastrax, demonstrating integration of external APIs with LLM-powered planning. - [Example: Categorizing Birds | Agents | Kastrax Docs](https://kastrax.ai/en/examples/agents/bird-checker): Example of using a Kastrax AI Agent to determine if an image from Unsplash depicts a bird. - [Example: Deploying an MCPServer | Agents | Kastrax Docs](https://kastrax.ai/en/examples/agents/deploying-mcp-server): Example of setting up, building, and deploying a Kastrax MCPServer using the stdio transport and publishing it to NPM. - [Example: Hierarchical Multi-Agent System | Agents | Kastrax](https://kastrax.ai/en/examples/agents/hierarchical-multi-agent): Example of creating a hierarchical multi-agent system using Kastrax, where agents interact through tool functions. - [Example: Multi-Agent Workflow | Agents | Kastrax Docs](https://kastrax.ai/en/examples/agents/multi-agent-workflow): Example of creating an agentic workflow in Kastrax, where work product is passed between multiple agents. - [Example: Agents with a System Prompt | Agents | Kastrax Docs](https://kastrax.ai/en/examples/agents/system-prompt): Example of creating an AI agent in Kastrax with a system prompt to define its personality and capabilities. - [Example: Giving an Agent a Tool | Agents | Kastrax Docs](https://kastrax.ai/en/examples/agents/using-a-tool): Example of creating an AI agent in Kastrax that uses a dedicated tool to provide weather information. - [Example: Answer Relevancy | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/answer-relevancy): Example of using the Answer Relevancy metric to evaluate response relevancy to queries. - [Example: Bias | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/bias): Example of using the Bias metric to evaluate responses for various forms of bias. - [Example: Completeness | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/completeness): Example of using the Completeness metric to evaluate how thoroughly responses cover input elements. - [Example: Content Similarity | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/content-similarity): Example of using the Content Similarity metric to evaluate text similarity between content. - [Example: Context Position | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/context-position): Example of using the Context Position metric to evaluate sequential ordering in responses. - [Example: Context Precision | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/context-precision): Example of using the Context Precision metric to evaluate how precisely context information is used. - [Example: Context Relevancy | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/context-relevancy): Example of using the Context Relevancy metric to evaluate how relevant context information is to a query. - [Example: Contextual Recall | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/contextual-recall): Example of using the Contextual Recall metric to evaluate how well responses incorporate context information. - [Example: Custom Eval | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/custom-eval): Example of creating custom LLM-based evaluation metrics in Kastrax. - [Example: Faithfulness | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/faithfulness): Example of using the Faithfulness metric to evaluate how factually accurate responses are compared to context. - [Example: Hallucination | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/hallucination): Example of using the Hallucination metric to evaluate factual contradictions in responses. - [Example: Keyword Coverage | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/keyword-coverage): Example of using the Keyword Coverage metric to evaluate how well responses cover important keywords from input text. - [Example: Prompt Alignment | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/prompt-alignment): Example of using the Prompt Alignment metric to evaluate instruction adherence in responses. - [Example: Summarization | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/summarization): Example of using the Summarization metric to evaluate how well LLM-generated summaries capture content while maintaining factual accuracy. - [Example: Textual Difference | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/textual-difference): Example of using the Textual Difference metric to evaluate similarity between text strings by analyzing sequence differences and changes. - [Example: Tone Consistency | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/tone-consistency): Example of using the Tone Consistency metric to evaluate emotional tone patterns and sentiment consistency in text. - [Example: Toxicity | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/toxicity): Example of using the Toxicity metric to evaluate responses for harmful content and toxic language. - [Example: Word Inclusion | Evals | Kastrax Docs](https://kastrax.ai/en/examples/evals/word-inclusion): Example of creating a custom metric to evaluate word inclusion in output text. - [Examples List: Workflows, Agents, RAG | Kastrax Docs](https://kastrax.ai/en/examples): Explore practical examples of AI development with Kastrax, including text generation, RAG implementations, structured outputs, and multi-modal interactions. Learn how to build AI applications using OpenAI, Anthropic, and Google Gemini. - [Memory Processors](https://kastrax.ai/en/examples/memory/memory-processors): Example of using memory processors to filter and transform recalled messages - [memory-with-libsql](https://kastrax.ai/en/examples/memory/memory-with-libsql) - [memory-with-pg](https://kastrax.ai/en/examples/memory/memory-with-pg) - [memory-with-upstash](https://kastrax.ai/en/examples/memory/memory-with-upstash) - [Streaming Working Memory (advanced)](https://kastrax.ai/en/examples/memory/streaming-working-memory-advanced): Example of using working memory to maintain a todo list across conversations - [Streaming Working Memory](https://kastrax.ai/en/examples/memory/streaming-working-memory): Example of using working memory with an agent - [AI SDK useChat Hook](https://kastrax.ai/en/examples/memory/use-chat): Example showing how to integrate Kastrax memory with the Vercel AI SDK useChat hook. - [Example: Adjusting Chunk Delimiters | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/chunking/adjust-chunk-delimiters): Adjust chunk delimiters in Kastrax to better match your content structure. - [Example: Adjusting The Chunk Size | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/chunking/adjust-chunk-size): Adjust chunk size in Kastrax to better match your content and memory requirements. - [Example: Semantically Chunking HTML | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/chunking/chunk-html): Chunk HTML content in Kastrax to semantically chunk the document. - [Example: Semantically Chunking JSON | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/chunking/chunk-json): Chunk JSON data in Kastrax to semantically chunk the document. - [Example: Semantically Chunking Markdown | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/chunking/chunk-markdown): Example of using Kastrax to chunk markdown documents for search or retrieval purposes. - [Example: Semantically Chunking Text | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/chunking/chunk-text): Example of using Kastrax to split large text documents into smaller chunks for processing. - [Example: Embedding Chunk Arrays | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/embedding/embed-chunk-array): Example of using Kastrax to generate embeddings for an array of text chunks for similarity search. - [Example: Embedding Text Chunks | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/embedding/embed-text-chunk): Example of using Kastrax to generate an embedding for a single text chunk for similarity search. - [Example: Embedding Text with Cohere | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/embedding/embed-text-with-cohere): Example of using Kastrax to generate embeddings using Coheres embedding model. - [Example: Metadata Extraction | Retrieval | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/embedding/metadata-extraction): Example of extracting and utilizing metadata from documents in Kastrax for enhanced document processing and retrieval. - [Example: Hybrid Vector Search | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/query/hybrid-vector-search): Example of using metadata filters with PGVector to enhance vector search results in Kastrax. - [Example: Retrieving Top-K Results | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/query/retrieve-results): Example of using Kastrax to query a vector database and retrieve semantically similar chunks. - [Example: Re-ranking Results with Tools | Retrieval | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/rerank/rerank-rag): Example of implementing a RAG system with re-ranking in Kastrax using OpenAI embeddings and PGVector for vector storage. - [Example: Re-ranking Results | Retrieval | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/rerank/rerank): Example of implementing semantic re-ranking in Kastrax using OpenAI embeddings and PGVector for vector storage. - [Example: Reranking with Cohere | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/rerank/reranking-with-cohere): Example of using Kastrax to improve document retrieval relevance with Coheres reranking service. - [Example: Upsert Embeddings | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/upsert/upsert-embeddings): Examples of using Kastrax to store embeddings in various vector databases for similarity search. - [Example: Using the Vector Query Tool | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/usage/basic-rag): Example of implementing a basic RAG system in Kastrax using OpenAI embeddings and PGVector for vector storage. - [Example: Optimizing Information Density | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/usage/cleanup-rag): Example of implementing a RAG system in Kastrax to optimize information density and deduplicate data using LLM-based processing. - [Example: Chain of Thought Prompting | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/usage/cot-rag): Example of implementing a RAG system in Kastrax with chain-of-thought reasoning using OpenAI and PGVector. - [Example: Structured Reasoning with Workflows | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/usage/cot-workflow-rag): Example of implementing structured reasoning in a RAG system using Kastraxs workflow capabilities. - [Example: Agent-Driven Metadata Filtering | Retrieval | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/usage/filter-rag): Example of using a Kastrax agent in a RAG system to construct and apply metadata filters for document retrieval. - [Example: A Complete Graph RAG System | RAG | Kastrax Docs](https://kastrax.ai/en/examples/rag/usage/graph-rag): Example of implementing a Graph RAG system in Kastrax using OpenAI embeddings and PGVector for vector storage. - [Speech to Speech](https://kastrax.ai/en/examples/voice/speech-to-speech): Example of using Kastrax to create a speech to speech application. - [Example: Speech to Text | Voice | Kastrax Docs](https://kastrax.ai/en/examples/voice/speech-to-text): Example of using Kastrax to create a speech to text application. - [Example: Text to Speech | Voice | Kastrax Docs](https://kastrax.ai/en/examples/voice/text-to-speech): Example of using Kastrax to create a text to speech application. - [Turn Taking](https://kastrax.ai/en/examples/voice/turn-taking): Example of using Kastrax to create a multi-agent debate with turn-taking conversation flow. - [Example: Branching Paths | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows/branching-paths): Example of using Kastrax to create workflows with branching paths based on intermediate results. - [Example: Calling an Agent from a Workflow | Kastrax Docs](https://kastrax.ai/en/examples/workflows/calling-agent): Example of using Kastrax to call an AI agent from within a workflow step. - [Example: Conditional Branching (experimental) | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows/conditional-branching): Example of using Kastrax to create conditional branches in workflows using if/else statements. - [Example: Creating a Workflow | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows/creating-a-workflow): Example of using Kastrax to define and execute a simple workflow with a single step. - [Example: Cyclical Dependencies | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows/cyclical-dependencies): Example of using Kastrax to create workflows with cyclical dependencies and conditional loops. - [Example: Human in the Loop | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows/human-in-the-loop): Example of using Kastrax to create workflows with human intervention points. - [Example: Parallel Execution | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows/parallel-steps): Example of using Kastrax to execute multiple independent tasks in parallel within a workflow. - [Example: Sequential Steps | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows/sequential-steps): Example of using Kastrax to chain workflow steps in a specific sequence, passing data between them. - [Example: Suspend and Resume | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows/suspend-and-resume): Example of using Kastrax to suspend and resume workflow steps during execution. - [Example: Using a Tool as a Step | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows/using-a-tool-as-a-step): Example of using Kastrax to integrate a custom tool as a step in a workflow. - [Data Mapping with Workflow Variables | Kastrax Examples](https://kastrax.ai/en/examples/workflows/workflow-variables): Learn how to use workflow variables to map data between steps in Kastrax workflows. - [Example: Using a Tool/Agent as a Step | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows_vNext/agent-and-tool-interop): Example of using Kastrax to integrate a tool or an agent as a step in a workflow. - [Example: Calling an Agent from a Workflow | Kastrax Docs](https://kastrax.ai/en/examples/workflows_vNext/calling-agent): Example of using Kastrax to call an AI agent from within a workflow step. - [Example: Conditional Branching | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows_vNext/conditional-branching): Example of using Kastrax to create conditional branches in workflows using the `branch` statement . - [Example: Control Flow | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows_vNext/control-flow): Example of using Kastrax to create workflows with loops based on provided conditions. - [Example: Human in the Loop | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows_vNext/human-in-the-loop): Example of using Kastrax to create workflows with human intervention points. - [Example: Parallel Execution | Workflows | Kastrax Docs](https://kastrax.ai/en/examples/workflows_vNext/parallel-steps): Example of using Kastrax to execute multiple independent tasks in parallel within a workflow. ## EN - guides - [Building an AI Recruiter | Kastrax Workflows | Guides](https://kastrax.ai/en/guides/guide/ai-recruiter): Guide on building a recruiter workflow in Kastrax to gather and process candidate information using LLMs. - [Building an AI Chef Assistant | Kastrax Agent Guides](https://kastrax.ai/en/guides/guide/chef-michel): Guide on creating a Chef Assistant agent in Kastrax to help users cook meals with available ingredients. - [Building a Research Paper Assistant | Kastrax RAG Guides](https://kastrax.ai/en/guides/guide/research-assistant): Guide on creating an AI research assistant that can analyze and answer questions about academic papers using RAG. - [Building an AI Stock Agent | Kastrax Agents | Guides](https://kastrax.ai/en/guides/guide/stock-agent): Guide on creating a simple stock agent in Kastrax to fetch the last days closing stock price for a given symbol. - [Overview](https://kastrax.ai/en/guides): Guides on building with Kastrax ## EN - reference - [Reference: Agent | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/agent): Documentation for the Agent class in Kastrax, which provides the foundation for creating AI agents with various capabilities. - [Reference: createTool() | Tools | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/createTool): Documentation for the createTool function in Kastrax, which creates custom tools for agents and workflows. - [Reference: Agent.generate() | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/generate): Documentation for the `.generate()` method in Kastrax agents, which produces text or structured responses. - [Reference: getAgent() | Agent Config | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/getAgent): API Reference for getAgent. - [Reference: Agent.getInstructions() | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/getInstructions): Documentation for the `.getInstructions()` method in Kastrax agents, which retrieves the instructions that guide the agents behavior. - [Reference: Agent.getMemory() | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/getMemory): Documentation for the `.getMemory()` method in Kastrax agents, which retrieves the memory system associated with the agent. - [Reference: Agent.getModel() | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/getModel): Documentation for the `.getModel()` method in Kastrax agents, which retrieves the language model that powers the agent. - [Reference: Agent.getTools() | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/getTools): Documentation for the `.getTools()` method in Kastrax agents, which retrieves the tools that the agent can use. - [Reference: Agent.getVoice() | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/getVoice): Documentation for the `.getVoice()` method in Kastrax agents, which retrieves the voice provider for speech capabilities. - [Reference: Agent.stream() | Streaming | Agents | Kastrax Docs](https://kastrax.ai/en/reference/agents/stream): Documentation for the `.stream()` method in Kastrax agents, which enables real-time streaming of responses. - [kastrax build](https://kastrax.ai/en/reference/cli/build): Build your Kastrax project for production deployment - [`kastrax dev` Reference | Local Development | Kastrax CLI](https://kastrax.ai/en/reference/cli/dev): Documentation for the kastrax dev command, which starts a development server for agents, tools, and workflows. - [`kastrax init` reference | Project Creation | Kastrax CLI](https://kastrax.ai/en/reference/cli/init): Documentation for the kastrax init command, which creates a new Kastrax project with interactive setup options. - [agents](https://kastrax.ai/en/reference/client-js/agents) - [error-handling](https://kastrax.ai/en/reference/client-js/error-handling) - [logs](https://kastrax.ai/en/reference/client-js/logs) - [memory](https://kastrax.ai/en/reference/client-js/memory) - [telemetry](https://kastrax.ai/en/reference/client-js/telemetry) - [tools](https://kastrax.ai/en/reference/client-js/tools) - [vectors](https://kastrax.ai/en/reference/client-js/vectors) - [workflows](https://kastrax.ai/en/reference/client-js/workflows) - [Kastrax Core](https://kastrax.ai/en/reference/core/kastrax-class): Documentation for the Kastrax Class, the core entry point for managing agents, workflows, and server endpoints. - [Cloudflare Deployer](https://kastrax.ai/en/reference/deployer/cloudflare): Documentation for the CloudflareDeployer class, which deploys Kastrax applications to Cloudflare Workers. - [Kastrax Deployer](https://kastrax.ai/en/reference/deployer/deployer): Documentation for the Deployer abstract class, which handles packaging and deployment of Kastrax applications. - [Netlify Deployer](https://kastrax.ai/en/reference/deployer/netlify): Documentation for the NetlifyDeployer class, which deploys Kastrax applications to Netlify Functions. - [Vercel Deployer](https://kastrax.ai/en/reference/deployer/vercel): Documentation for the VercelDeployer class, which deploys Kastrax applications to Vercel. - [Reference: Answer Relevancy | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/answer-relevancy): Documentation for the Answer Relevancy Metric in Kastrax, which evaluates how well LLM outputs address the input query. - [Reference: Bias | Output Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/bias): Documentation for the Bias Metric in Kastrax, which evaluates LLM outputs for various forms of bias, including gender, political, racial/ethnic, or geographical bias. - [Reference: Completeness | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/completeness): Documentation for the Completeness Metric in Kastrax, which evaluates how thoroughly LLM outputs cover key elements present in the input. - [Reference: Content Similarity | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/content-similarity): Documentation for the Content Similarity Metric in Kastrax, which measures textual similarity between strings and provides a matching score. - [Reference: Context Position | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/context-position): Documentation for the Context Position Metric in Kastrax, which evaluates the ordering of context nodes based on their relevance to the query and output. - [Reference: Context Precision | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/context-precision): Documentation for the Context Precision Metric in Kastrax, which evaluates the relevance and precision of retrieved context nodes for generating expected outputs. - [Reference: Context Relevancy | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/context-relevancy): Documentation for the Context Relevancy Metric, which evaluates the relevance of retrieved context in RAG pipelines. - [Reference: Contextual Recall | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/contextual-recall): Documentation for the Contextual Recall Metric, which evaluates the completeness of LLM responses in incorporating relevant context. - [Reference: Faithfulness | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/faithfulness): Documentation for the Faithfulness Metric in Kastrax, which evaluates the factual accuracy of LLM outputs compared to the provided context. - [Reference: Hallucination | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/hallucination): Documentation for the Hallucination Metric in Kastrax, which evaluates the factual correctness of LLM outputs by identifying contradictions with provided context. - [Reference: Keyword Coverage | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/keyword-coverage): Documentation for the Keyword Coverage Metric in Kastrax, which evaluates how well LLM outputs cover important keywords from the input. - [Reference: Prompt Alignment | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/prompt-alignment): Documentation for the Prompt Alignment Metric in Kastrax, which evaluates how well LLM outputs adhere to given prompt instructions. - [Reference: Summarization | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/summarization): Documentation for the Summarization Metric in Kastrax, which evaluates the quality of LLM-generated summaries for content and factual accuracy. - [Reference: Textual Difference | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/textual-difference): Documentation for the Textual Difference Metric in Kastrax, which measures textual differences between strings using sequence matching. - [Reference: Tone Consistency | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/tone-consistency): Documentation for the Tone Consistency Metric in Kastrax, which evaluates emotional tone and sentiment consistency in text. - [Reference: Toxicity | Metrics | Evals | Kastrax Docs](https://kastrax.ai/en/reference/evals/toxicity): Documentation for the Toxicity Metric in Kastrax, which evaluates LLM outputs for racist, biased, or toxic elements. - [API Reference](https://kastrax.ai/en/reference): Kastrax API Reference - [Memory](https://kastrax.ai/en/reference/memory/Memory) - [createThread](https://kastrax.ai/en/reference/memory/createThread) - [getThreadById](https://kastrax.ai/en/reference/memory/getThreadById) - [getThreadsByResourceId](https://kastrax.ai/en/reference/memory/getThreadsByResourceId) - [query](https://kastrax.ai/en/reference/memory/query) - [AgentNetwork (Experimental)](https://kastrax.ai/en/reference/networks/agent-network): Reference documentation for the AgentNetwork class - [Reference: createLogger() | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/create-logger): Documentation for the createLogger function, which instantiates a logger based on a given configuration. - [Reference: Logger Instance | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/logger): Documentation for Logger instances, which provide methods to record events at various severity levels. - [Reference: OtelConfig | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/otel-config): Documentation for the OtelConfig object, which configures OpenTelemetry instrumentation, tracing, and exporting behavior. - [Reference: Braintrust | Observability | Kastrax Docs](https://kastrax.ai/en/reference/observability/providers/braintrust): Documentation for integrating Braintrust with Kastrax, an evaluation and monitoring platform for LLM applications. - [Reference: Dash0 Integration | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/providers/dash0): Documentation for integrating Kastrax with Dash0, an Open Telementry native observability solution. - [Reference: Provider List | Observability | Kastrax Docs](https://kastrax.ai/en/reference/observability/providers): Overview of observability providers supported by Kastrax, including Dash0, SigNoz, Braintrust, Langfuse, and more. - [Reference: Laminar Integration | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/providers/laminar): Documentation for integrating Laminar with Kastrax, a specialized observability platform for LLM applications. - [Reference: Langfuse Integration | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/providers/langfuse): Documentation for integrating Langfuse with Kastrax, an open-source observability platform for LLM applications. - [Reference: LangSmith Integration | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/providers/langsmith): Documentation for integrating LangSmith with Kastrax, a platform for debugging, testing, evaluating, and monitoring LLM applications. - [Reference: LangWatch Integration | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/providers/langwatch): Documentation for integrating LangWatch with Kastrax, a specialized observability platform for LLM applications. - [Reference: New Relic Integration | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/providers/new-relic): Documentation for integrating New Relic with Kastrax, a comprehensive observability platform supporting OpenTelemetry for full-stack monitoring. - [Reference: SigNoz Integration | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/providers/signoz): Documentation for integrating SigNoz with Kastrax, an open-source APM and observability platform providing full-stack monitoring through OpenTelemetry. - [Reference: Traceloop Integration | Kastrax Observability Docs](https://kastrax.ai/en/reference/observability/providers/traceloop): Documentation for integrating Traceloop with Kastrax, an OpenTelemetry-native observability platform for LLM applications. - [Reference: Astra Vector Store | Vector Databases | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/astra): Documentation for the AstraVector class in Kastrax, which provides vector search using DataStax Astra DB. - [Reference: Chroma Vector Store | Vector Databases | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/chroma): Documentation for the ChromaVector class in Kastrax, which provides vector search using ChromaDB. - [Reference: .chunk() | Document Processing | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/chunk): Documentation for the chunk function in Kastrax, which splits documents into smaller segments using various strategies. - [Reference: MDocument | Document Processing | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/document): Documentation for the MDocument class in Kastrax, which handles document processing and chunking. - [Reference: embed() | Document Embedding | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/embeddings): Documentation for embedding functionality in Kastrax using the AI SDK. - [Reference: ExtractParams | Document Processing | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/extract-params): Documentation for metadata extraction configuration in Kastrax. - [Reference: GraphRAG | Graph-based RAG | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/graph-rag): Documentation for the GraphRAG class in Kastrax, which implements a graph-based approach to retrieval augmented generation. - [Default Vector Store | Vector Databases | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/libsql): Documentation for the LibSQLVector class in Kastrax, which provides vector search using LibSQL with vector extensions. - [Reference: Metadata Filters | Metadata Filtering | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/metadata-filters): Documentation for metadata filtering capabilities in Kastrax, which allow for precise querying of vector search results across different vector stores. - [Reference: MongoDB Vector Store | Vector Databases | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/mongodb): Documentation for the MongoDBVector class in Kastrax, which provides vector search using MongoDB Atlas and Atlas Vector Search. - [Reference: PG Vector Store | Vector Databases | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/pg): Documentation for the PgVector class in Kastrax, which provides vector search using PostgreSQL with pgvector extension. - [Reference: Pinecone Vector Store | Vector DBs | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/pinecone): Documentation for the PineconeVector class in Kastrax, which provides an interface to Pinecones vector database. - [Reference: Qdrant Vector Store | Vector Databases | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/qdrant): Documentation for integrating Qdrant with Kastrax, a vector similarity search engine for managing vectors and payloads. - [Reference: Rerank | Document Retrieval | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/rerank): Documentation for the rerank function in Kastrax, which provides advanced reranking capabilities for vector search results. - [Reference: Turbopuffer Vector Store | Vector Databases | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/turbopuffer): Documentation for integrating Turbopuffer with Kastrax, a high-performance vector database for efficient similarity search. - [Reference: Upstash Vector Store | Vector Databases | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/upstash): Documentation for the UpstashVector class in Kastrax, which provides vector search using Upstash Vector. - [Reference: Cloudflare Vector Store | Vector Databases | RAG | Kastrax Docs](https://kastrax.ai/en/reference/rag/vectorize): Documentation for the CloudflareVector class in Kastrax, which provides vector search using Cloudflare Vectorize. - [Cloudflare D1 Storage | Storage System | Kastrax Core](https://kastrax.ai/en/reference/storage/cloudflare-d1): Documentation for the Cloudflare D1 SQL storage implementation in Kastrax. - [Cloudflare Storage | Storage System | Kastrax Core](https://kastrax.ai/en/reference/storage/cloudflare): Documentation for the Cloudflare KV storage implementation in Kastrax. - [LibSQL Storage | Storage System | Kastrax Core](https://kastrax.ai/en/reference/storage/libsql): Documentation for the LibSQL storage implementation in Kastrax. - [PostgreSQL Storage | Storage System | Kastrax Core](https://kastrax.ai/en/reference/storage/postgresql): Documentation for the PostgreSQL storage implementation in Kastrax. - [Upstash Storage | Storage System | Kastrax Core](https://kastrax.ai/en/reference/storage/upstash): Documentation for the Upstash storage implementation in Kastrax. - [Reference: KastraxMCPClient | Tool Discovery | Kastrax Docs](https://kastrax.ai/en/reference/tools/client): API Reference for KastraxMCPClient - A client implementation for the Model Context Protocol. - [Reference: createDocumentChunkerTool() | Tools | Kastrax Docs](https://kastrax.ai/en/reference/tools/document-chunker-tool): Documentation for the Document Chunker Tool in Kastrax, which splits documents into smaller chunks for efficient processing and retrieval. - [Reference: createGraphRAGTool() | RAG | Kastrax Tools Docs](https://kastrax.ai/en/reference/tools/graph-rag-tool): Documentation for the Graph RAG Tool in Kastrax, which enhances RAG by building a graph of semantic relationships between documents. - [Reference: MCPClient | Tool Management | Kastrax Docs](https://kastrax.ai/en/reference/tools/mcp-client): API Reference for MCPClient - A class for managing multiple Model Context Protocol servers and their tools. - [Reference: MCPServer | Exposing Kastrax Tools via MCP | Kastrax Docs](https://kastrax.ai/en/reference/tools/mcp-server): API Reference for MCPServer - A class for exposing Kastrax tools and capabilities as a Model Context Protocol server. - [Reference: createVectorQueryTool() | RAG | Kastrax Tools Docs](https://kastrax.ai/en/reference/tools/vector-query-tool): Documentation for the Vector Query Tool in Kastrax, which facilitates semantic search over vector stores with filtering and reranking capabilities. - [Reference: Azure Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/azure): Documentation for the AzureVoice class, providing text-to-speech and speech-to-text capabilities using Azure Cognitive Services. - [Reference: Cloudflare Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/cloudflare): Documentation for the CloudflareVoice class, providing text-to-speech capabilities using Cloudflare Workers AI. - [Reference: CompositeVoice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/composite-voice): Documentation for the CompositeVoice class, which enables combining multiple voice providers for flexible text-to-speech and speech-to-text operations. - [Reference: Deepgram Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/deepgram): Documentation for the Deepgram voice implementation, providing text-to-speech and speech-to-text capabilities with multiple voice models and languages. - [Reference: ElevenLabs Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/elevenlabs): Documentation for the ElevenLabs voice implementation, offering high-quality text-to-speech capabilities with multiple voice models and natural-sounding synthesis. - [Reference: Google Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/google): Documentation for the Google Voice implementation, providing text-to-speech and speech-to-text capabilities. - [Reference: KastraxVoice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/kastrax-voice): Documentation for the KastraxVoice abstract base class, which defines the core interface for all voice services in Kastrax, including speech-to-speech capabilities. - [Reference: Murf Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/murf): Documentation for the Murf voice implementation, providing text-to-speech capabilities. - [Reference: OpenAI Realtime Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/openai-realtime): Documentation for the OpenAIRealtimeVoice class, providing real-time text-to-speech and speech-to-text capabilities via WebSockets. - [Reference: OpenAI Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/openai): Documentation for the OpenAIVoice class, providing text-to-speech and speech-to-text capabilities. - [Reference: PlayAI Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/playai): Documentation for the PlayAI voice implementation, providing text-to-speech capabilities. - [Reference: Sarvam Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/sarvam): Documentation for the Sarvam class, providing text-to-speech and speech-to-text capabilities. - [Reference: Speechify Voice | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/speechify): Documentation for the Speechify voice implementation, providing text-to-speech capabilities. - [Reference: voice.addInstructions() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.addInstructions): Documentation for the addInstructions() method available in voice providers, which adds instructions to guide the voice models behavior. - [Reference: voice.addTools() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.addTools): Documentation for the addTools() method available in voice providers, which equips voice models with function calling capabilities. - [Reference: voice.answer() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.answer): Documentation for the answer() method available in real-time voice providers, which triggers the voice provider to generate a response. - [Reference: voice.close() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.close): Documentation for the close() method available in voice providers, which disconnects from real-time voice services. - [Reference: voice.connect() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.connect): Documentation for the connect() method available in real-time voice providers, which establishes a connection for speech-to-speech communication. - [Reference: Voice Events | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.events): Documentation for events emitted by voice providers, particularly for real-time voice interactions. - [Reference: voice.getSpeakers() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.getSpeakers): Documentation for the getSpeakers() method available in voice providers, which retrieves available voice options. - [Reference: voice.listen() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.listen): Documentation for the listen() method available in all Kastrax voice providers, which converts speech to text. - [Reference: voice.off() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.off): Documentation for the off() method available in voice providers, which removes event listeners for voice events. - [Reference: voice.on() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.on): Documentation for the on() method available in voice providers, which registers event listeners for voice events. - [Reference: voice.send() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.send): Documentation for the send() method available in real-time voice providers, which streams audio data for continuous processing. - [Reference: voice.speak() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.speak): Documentation for the speak() method available in all Kastrax voice providers, which converts text to speech. - [Reference: voice.updateConfig() | Voice Providers | Kastrax Docs](https://kastrax.ai/en/reference/voice/voice.updateConfig): Documentation for the updateConfig() method available in voice providers, which updates the configuration of a voice provider at runtime. - [Reference: .after() | Building Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/after): Documentation for the `after()` method in workflows, enabling branching and merging paths. - [.afterEvent() Method | Kastrax Docs](https://kastrax.ai/en/reference/workflows/afterEvent): Reference for the afterEvent method in Kastrax workflows that creates event-based suspension points. - [Reference: Workflow.commit() | Running Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/commit): Documentation for the `.commit()` method in workflows, which re-initializes the workflow machine with the current step configuration. - [Reference: Workflow.createRun() | Running Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/createRun): Documentation for the `.createRun()` method in workflows, which initializes a new workflow run instance. - [Reference: Workflow.else() | Conditional Branching | Kastrax Docs](https://kastrax.ai/en/reference/workflows/else): Documentation for the `.else()` method in Kastrax workflows, which creates an alternative branch when an if condition is false. - [Event-Driven Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/events): Learn how to create event-driven workflows using afterEvent and resumeWithEvent methods in Kastrax. - [Reference: Workflow.execute() | Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/execute): Documentation for the `.execute()` method in Kastrax workflows, which runs workflow steps and returns results. - [Reference: Workflow.if() | Conditional Branching | Kastrax Docs](https://kastrax.ai/en/reference/workflows/if): Documentation for the `.if()` method in Kastrax workflows, which creates conditional branches based on specified conditions. - [Reference: run.resume() | Running Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/resume): Documentation for the `.resume()` method in workflows, which continues execution of a suspended workflow step. - [.resumeWithEvent() Method | Kastrax Docs](https://kastrax.ai/en/reference/workflows/resumeWithEvent): Reference for the resumeWithEvent method that resumes suspended workflows using event data. - [Reference: Snapshots | Workflow State Persistence | Kastrax Docs](https://kastrax.ai/en/reference/workflows/snapshots): Technical reference on snapshots in Kastrax - the serialized workflow state that enables suspend and resume functionality - [Reference: start() | Running Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/start): Documentation for the `start()` method in workflows, which begins execution of a workflow run. - [Reference: Step | Building Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/step-class): Documentation for the Step class, which defines individual units of work within a workflow. - [Reference: StepCondition | Building Workflows | Kastrax](https://kastrax.ai/en/reference/workflows/step-condition): Documentation for the step condition class in workflows, which determines whether a step should execute based on the output of previous steps or trigger data. - [Reference: Workflow.step() | Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/step-function): Documentation for the `.step()` method in workflows, which adds a new step to the workflow. - [Reference: StepOptions | Building Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/step-options): Documentation for the step options in workflows, which control variable mapping, execution conditions, and other runtime behavior. - [Step Retries | Error Handling | Kastrax Docs](https://kastrax.ai/en/reference/workflows/step-retries): Automatically retry failed steps in Kastrax workflows with configurable retry policies. - [Reference: suspend() | Control Flow | Kastrax Docs](https://kastrax.ai/en/reference/workflows/suspend): Documentation for the suspend function in Kastrax workflows, which pauses execution until resumed. - [Reference: Workflow.then() | Building Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/then): Documentation for the `.then()` method in workflows, which creates sequential dependencies between steps. - [Reference: Workflow.until() | Looping in Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/until): Documentation for the `.until()` method in Kastrax workflows, which repeats a step until a specified condition becomes true. - [Reference: run.watch() | Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/watch): Documentation for the `.watch()` method in workflows, which monitors the status of a workflow run. - [Reference: Workflow.while() | Looping in Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/while): Documentation for the `.while()` method in Kastrax workflows, which repeats a step as long as a specified condition remains true. - [Reference: Workflow Class | Building Workflows | Kastrax Docs](https://kastrax.ai/en/reference/workflows/workflow): Documentation for the Workflow class in Kastrax, which enables you to create state machines for complex sequences of operations with conditional branching and data validation. ## EN - showcase - [Showcase](https://kastrax.ai/en/showcase): Check out these applications built with Kastrax ## ZH - docs - [A2A 多代理协作 | A2A 协议 | Kastrax 文档](https://kastrax.ai/zh/docs/a2a/a2a-collaboration): A2A 协议的多代理协作机制,包括代理网络、协作模式和协作示例。 - [A2A 任务委派 | A2A 协议 | Kastrax 文档](https://kastrax.ai/zh/docs/a2a/a2a-delegation): A2A 协议的任务委派机制,包括任务创建、执行、取消和状态跟踪。 - [A2A 代理发现 | A2A 协议 | Kastrax 文档](https://kastrax.ai/zh/docs/a2a/a2a-discovery): A2A 协议的代理发现机制,包括代理注册、发现和查询。 - [A2A 安全机制 | A2A 协议 | Kastrax 文档](https://kastrax.ai/zh/docs/a2a/a2a-security): A2A 协议的安全机制,包括认证、授权、数据加密和安全最佳实践。 - [A2A 协议概述 | A2A 协议 | Kastrax 文档](https://kastrax.ai/zh/docs/a2a/overview): A2A (Agent-to-Agent) 协议的概述,包括核心概念、设计目标和实现方式。 - [Actor-代理集成 | Actor 模型 | Kastrax 文档](https://kastrax.ai/zh/docs/actor/actor-agent-integration-kotlin): 将 Kastrax 代理与 Actor 模型集成的详细指南,使分布式、并发代理系统成为可能。 - [Actor 模型概述 | Kastrax 文档](https://kastrax.ai/zh/docs/actor/overview): Kastrax 中 Actor 模型的概述,详细说明它如何为构建分布式、并发和弹性 AI 代理系统提供基础。 - [代理工具选择 | 代理文档 | Kastrax](https://kastrax.ai/zh/docs/agents/adding-tools): 工具是可以由代理或工作流执行的类型化函数,具有内置的集成访问和参数验证功能。每个工具都有一个定义其输入的模式,一个实现其逻辑的执行函数,以及对配置的集成的访问权限。 - [adding-voice](https://kastrax.ai/zh/docs/agents/adding-voice) - [代理架构 | 代理文档 | Kastrax](https://kastrax.ai/zh/docs/agents/architectures-kotlin): Kastrax 中不同代理架构的概述,包括自适应、目标导向、层次化、反思性和创造性代理。 - [architectures](https://kastrax.ai/zh/docs/agents/architectures) - [代理监控和诊断 | Kastrax 文档](https://kastrax.ai/zh/docs/agents/monitoring-kotlin): Kastrax 中代理性能监控和诊断的详细指南,包括指标收集、性能分析和调试工具。 - [创建和使用代理 | 代理文档 | Kastrax](https://kastrax.ai/zh/docs/agents/overview): Kastrax 中代理的概述,详细说明它们的能力以及它们如何与工具、记忆和外部系统交互。 - [代理版本控制和状态管理 | Kastrax 文档](https://kastrax.ai/zh/docs/agents/versioning-kotlin): Kastrax 中管理代理版本和状态的详细指南,包括版本创建、激活、回滚和状态持久化。 - [KastraX 核心类 | Kastrax 文档](https://kastrax.ai/zh/docs/core/kastrax-class-kotlin): KastraX 类的文档,这是 Kastrax 框架中管理代理、工具和其他组件的核心入口点。 - [KastraX 核心类 | 核心概念 | Kastrax 文档](https://kastrax.ai/zh/docs/core/kastrax-class): KastraX 类的文档,这是 Kastrax 框架中管理代理、工具和其他组件的核心入口点。 - [评估系统概述 | Kastrax 文档](https://kastrax.ai/zh/docs/evals/overview): Kastrax 评估系统的详细介绍,包括评估框架、评估指标和评估方法的实现和使用方法。 - [创建您的第一个代理 | 入门指南 | Kastrax 文档](https://kastrax.ai/zh/docs/getting-started/first-agent-kotlin): 学习如何使用 Kastrax 创建您的第一个 AI 代理,包括基本配置、记忆和工具。 - [安装 Kastrax | 入门指南 | Kastrax 文档](https://kastrax.ai/zh/docs/getting-started/installation-kotlin): 关于安装 Kastrax 并为您的 Kotlin 项目设置必要先决条件的指南。 - [installation](https://kastrax.ai/zh/docs/getting-started/installation) - [介绍 | Kastrax 文档](https://kastrax.ai/zh/docs/getting-started/overview-kotlin): Kastrax 是一个 Kotlin 代理框架。它通过代理、actor、记忆、工具和 RAG 等强大的原语,帮助您快速构建 AI 应用程序和功能。 - [overview](https://kastrax.ai/zh/docs/getting-started/overview) - [本地项目结构 | 入门指南 | Kastrax 文档](https://kastrax.ai/zh/docs/getting-started/project-structure): 关于在 Kastrax 中组织文件夹和文件的指南,包括最佳实践和推荐结构。 - [介绍 | Kastrax 文档](https://kastrax.ai/zh/docs): Kastrax 是一个 Kotlin 代理框架。它通过代理、actor、记忆、工具和 RAG 等强大的原语,帮助您快速构建 AI 应用程序和功能。 - [implementations](https://kastrax.ai/zh/docs/memory/implementations) - [memory-processors](https://kastrax.ai/zh/docs/memory/memory-processors) - [overview](https://kastrax.ai/zh/docs/memory/overview) - [semantic-recall](https://kastrax.ai/zh/docs/memory/semantic-recall) - [working-memory](https://kastrax.ai/zh/docs/memory/working-memory) - [追踪系统 | 可观测性 | Kastrax 文档](https://kastrax.ai/zh/docs/observability/tracing): Kastrax 追踪系统的详细介绍,包括追踪架构、追踪 API 和追踪集成的实现和使用方法。 - [高级检索技术 | RAG 系统 | Kastrax 文档](https://kastrax.ai/zh/docs/rag/advanced-retrieval): Kastrax RAG 系统中的高级检索技术,包括查询转换、混合检索、语义检索和重排序策略。 - [文档分块和嵌入 | RAG | Kastrax 文档](https://kastrax.ai/zh/docs/rag/chunking-and-embedding): Kastrax 中文档分块和嵌入的指南,用于高效处理和检索。 - [RAG 评估 | RAG 系统 | Kastrax 文档](https://kastrax.ai/zh/docs/rag/evaluation): 如何评估和优化 Kastrax RAG 系统的性能,包括检索评估、生成评估和端到端评估。 - [Kotlin RAG 系统概述 | Kastrax 文档](https://kastrax.ai/zh/docs/rag/overview-kotlin): Kastrax 中 Kotlin 检索增强生成 (RAG) 系统的详细介绍,包括文档处理、嵌入、检索和集成。 - [RAG 系统概述 | Kastrax 文档](https://kastrax.ai/zh/docs/rag/overview): Kastrax 中检索增强生成 (RAG) 的概述,详细说明其使用相关上下文增强 LLM 输出的能力。 - [检索、语义搜索、重排序 | RAG | Kastrax 文档](https://kastrax.ai/zh/docs/rag/retrieval): Kastrax RAG 系统中检索过程的指南,包括语义搜索、过滤和重排序。 - [在向量数据库中存储嵌入 | Kastrax 文档](https://kastrax.ai/zh/docs/rag/vector-databases): Kastrax 中向量存储选项的指南,包括用于相似度搜索的嵌入式和专用向量数据库。 - [内置工具 | Kastrax 文档](https://kastrax.ai/zh/docs/tools/built-in-tools): Kastrax 提供的内置工具详细指南,包括计算器、网络搜索、文件系统等工具。 - [自定义工具开发 | Kastrax 文档](https://kastrax.ai/zh/docs/tools/custom-tools): 如何为 Kastrax 代理创建自定义工具,包括工具定义、参数验证、错误处理和最佳实践。 - [工具系统概述 | Kastrax 文档](https://kastrax.ai/zh/docs/tools/overview): Kastrax 工具系统的详细介绍,包括工具定义、注册、调用和自定义工具的创建方法。 - [工具链 | Kastrax 文档](https://kastrax.ai/zh/docs/tools/tool-chains): 如何在 Kastrax 中创建和使用工具链,将多个工具组合成复杂的处理流程。 - [Zod 工具系统 | Kastrax 文档](https://kastrax.ai/zh/docs/tools/zod-tools): Kastrax 的 Zod 工具系统详细指南,包括类型安全的工具创建、模式定义和验证。 - [分支、合并、条件 | 工作流 | Kastrax 文档](https://kastrax.ai/zh/docs/workflows/control-flow): Kastrax 工作流中的控制流允许您管理分支、合并和条件,以构建满足您逻辑需求的工作流。 - [工作流中的错误处理 | Kastrax 文档](https://kastrax.ai/zh/docs/workflows/error-handling): 学习如何在 Kastrax 工作流中使用步骤重试、条件分支和监控来处理错误。 - [nested-workflows](https://kastrax.ai/zh/docs/workflows/nested-workflows) - [工作流系统概述 | Kastrax 文档](https://kastrax.ai/zh/docs/workflows/overview-kotlin): Kastrax 中工作流系统的概述,详细说明如何创建、配置和执行工作流。 - [创建步骤并添加到工作流 | Kastrax 文档](https://kastrax.ai/zh/docs/workflows/steps): Kastrax 工作流中的步骤通过定义输入、输出和执行逻辑,提供了一种结构化的方式来管理操作。 - [使用工作流变量进行数据映射 | Kastrax 文档](https://kastrax.ai/zh/docs/workflows/variables): 学习如何使用工作流变量在步骤之间映射数据,并在 Kastrax 工作流中创建动态数据流。 - [在工作流中使用代理和工具 | 工作流 (vNext) | Kastrax 文档](https://kastrax.ai/zh/docs/workflows-vnext/using-with-agents-and-tools): Kastrax 工作流 (vNext) 中的步骤通过定义输入、输出和执行逻辑,提供了一种结构化的方式来管理操作。