Agents API is a Bun-based application that provides agentic capabilities for personal use, allowing users to leverage various AI models for information retrieval and summarization. This project offers a flexible framework for processing and synthesizing information from multiple sources, including web searches.
- Implements agentic capabilities for personal use
- Modular design allowing easy integration of different AI models
- Web search summarization using Brave Search
- Combines multiple search results into a coherent summary
- Supports streaming responses for real-time interaction
- Currently uses GPT-3.5, Llama 3.1, and Mistral AI models, with easy extensibility
- Bun runtime
- API keys for OpenAI, Groq, and Brave Search
-
Clone the repository:
git clone [email protected]:GuiBibeau/agents-api.git cd agents-api
-
Install dependencies:
bun install
-
Set up environment variables: Create a
.env
file in the root directory and add the following:OPENAI_API_KEY=your_openai_api_key GROQ_API_KEY=your_groq_api_key BRAVE_API_KEY=your_brave_api_key
-
Start the server:
bun run index.ts
-
Access the API endpoints:
- Health check:
GET /
- Search and summarize:
GET /search?q=your_query&stream=true|false
- Health check:
-
View API documentation:
- Access Swagger UI:
http://localhost:8080/api-docs
- Access Swagger UI:
index.ts
: Main application filechat-models/
: AI model configurations (easily extendable)tools/
: Search tool implementationslib/
: Utility functions and configurations
- express: Web server framework
- @langchain/openai: OpenAI language models
- @langchain/groq: Groq AI models
- langchain: LangChain library for building AI applications
- swagger-jsdoc and swagger-ui-express: API documentation
- Additional Tools: Integrate more tools for diverse data sources and functionalities.
- Model Optimization: Fine-tune and optimize AI models for better performance.
- Enhanced Agentic Capabilities: Develop more sophisticated agent behaviors and decision-making processes.
Contributions are welcome! Please feel free to submit a Pull Request.
Do as you wish my friend.