Quick Start
Building intelligent agents is a breeze with the Ax framework, inspired by the power of “Agentic workflows” and the Stanford DSPy paper. It seamlessly integrates with multiple LLMs and VectorDBs to build RAG pipelines or collaborative agents that can solve complex problems. Plus, it offers advanced features like streaming validation, multi-modal DSPy, etc.
Install
With NPM
With Yarn
Pick an LLM
Ax is a zero-dependency framework. Every LLM API integration we build is solid, works well with Ax, and supports all required features, such as function calling, multi-modal, JSON, streaming, etc.
Currently we support "openai" | "azure-openai" | "together" | "anthropic" | "groq" | "google-gemini" | "cohere" | "huggingface" | "mistral" | "deepseek" | "ollama"
The LLMs are pre-configured with sensible defaults such as models and other conifgurations such as topK, temperature, etc
Prompting
Prompts are usually stressful and complex. You never know what the right prompt is, and blobs of text in your code are hard to deal with. We fix this by adopting the prompt signatures from the popular Stanford DSPy paper.
A prompt signature is a list of typed input and output fields along with a task description prefix.
the following fields are supported 'string' | 'number' | 'boolean' | 'json' | 'image'
add a []
to convert a field into an array field eg. string[]
, number[]
, etc. Additionally a ?
marks the field as an optional field context?:string
.
Summarize some text
Answer questions using a multi-modal prompt that takes a question and an image
A prompt that ensures the response is a numeric list
Putting it all together
Use the above AI and a prompt to build an LLM-powered program to summarize the text.
Build your first agent
Ax makes it really simple to build agents. An agent requires a name
, description
and signature
. it can optionally use functions
and other agents
.
Example Stock Analyst Agent The Stock Analyst Agent is an advanced AI-powered tool that provides comprehensive stock analysis and financial insights. It combines multiple specialized sub-agents and functions to deliver in-depth evaluations of stocks, market trends, and related financial data.
This is only an example, but it highlights the power of agentic workflows, where you can build agents who work with agents to handle complex tasks.
Example of agents working with other agents