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

Flow Examples

RAG Examples

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: