Examples
This section contains a variety of practical examples showing how to build applications with Manas. Each example demonstrates specific features of the framework and includes complete code that you can run and adapt.
Getting Started Examples
-
RAG Usage Learn how to use the Retrieval-Augmented Generation (RAG) capabilities to enhance LLM outputs with relevant information.
-
Tool Usage Build an agent that can use external tools to solve problems and answer questions by interacting with APIs and services.
Advanced Examples
-
Research Assistant Implement a multi-agent system that can research topics, synthesize information, and generate reports.
-
Knowledge Base QA Create a question-answering system over your own documents and knowledge bases.
By Feature
Agent Examples
- Simple Agent - Creating and configuring basic agents
- Tool-Using Agent - Building agents that use external tools
- Memory-Enhanced Agent - Agents with conversation memory
Flow Examples
- Two-Node Flow - Simple sequential flow with two nodes
- Research Flow - Complex flow for research tasks
- Feedback Flow - Flow with feedback loops for refinement
RAG Examples
- Basic RAG - Simple retrieval-augmented generation
- Chunking Strategies - Different document chunking approaches
- Multi-Vector RAG - Advanced RAG with multiple vector indices
Running the Examples
Most examples can be run with:
1
2
3
4
5
6
7
8
9
# Clone the repository
git clone https://github.com/arkokoley/manas.git
cd manas
# Install dependencies
pip install -e ".[all-cpu]" # or .[all-gpu] for GPU support
# Run an example
python examples/simple_agent.py
Be sure to set the required environment variables for API keys:
1
2
export OPENAI_API_KEY=your_api_key_here
export ANTHROPIC_API_KEY=your_api_key_here
Next Steps
After exploring these examples, check out:
- Getting Started Guide for a proper introduction
- Core Concepts to understand the framework architecture
- API Reference for detailed documentation