ax  by ax-llm

SDK for building LLM-powered agents and workflows, based on DSPy

created 2 years ago
1,720 stars

Top 25.3% on sourcepulse

GitHubView on GitHub
Project Summary

Ax is a TypeScript framework for building LLM-powered agents and workflows, inspired by the DSPy paper. It offers end-to-end streaming, multi-modal support, and automatic prompt generation from type-safe signatures, aiming to simplify LLM development and reduce token usage. The framework is designed for developers building complex LLM applications, from simple text summarization to multi-agent systems.

How It Works

Ax leverages "prompt signatures" which define inputs and outputs with specific types (string, number, boolean, class, arrays, etc.). These signatures are used to auto-generate prompts, enabling type-safe and efficient LLM interactions. The framework handles parsing, validation, error correction, and function calling natively during streaming, providing a robust and performant experience. It supports a wide array of LLMs and integrates features like RAG, vector databases, and prompt optimization.

Quick Start & Requirements

  • Install: npm install @ax-llm/ax or yarn add @ax-llm/ax
  • Requirements: Node.js environment. Specific LLM providers may require API keys.
  • Example Usage: See the provided TypeScript examples for chain-of-thought, agent building, RAG, and multi-modal interactions.

Highlighted Details

  • Supports a broad range of LLMs including OpenAI, Gemini, Anthropic, Cohere, Mistral, Ollama, and more.
  • Features built-in support for vector databases (in-memory, Weaviate, Cloudflare, Pinecone) and document processing (Apache Tika).
  • Offers advanced prompt tuning capabilities with AxBootstrapFewShot and MiPRO v2 for automated optimization.
  • Integrates with Vercel AI SDK and provides OpenTelemetry tracing for observability.
  • Includes built-in functions for JS interpretation, Docker sandboxing, and embedding adapters.

Maintenance & Community

  • The project appears actively maintained, with a focus on integrating the latest research and LLM capabilities.
  • Community engagement channels are not explicitly listed in the README, but the project's goal is to be a comprehensive, easy-to-use library.

Licensing & Compatibility

  • The README does not explicitly state a license. Users should verify licensing terms before commercial use.

Limitations & Caveats

  • The README does not detail specific limitations or known issues. Users should exercise caution with newer features or less-tested integrations.
Health Check
Last commit

23 hours ago

Responsiveness

1 day

Pull Requests (30d)
32
Issues (30d)
14
Star History
291 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.