Autonomous Agent

One agent. Every tool it needs.

Autonomous tool orchestration powered by Cohere Command R+. The agent reasons about your query, selects the right tools, and synthesizes results across multi-turn conversations.

4
Built-in Tools
Multi
Turn Conversations
Auto
Tool Selection
Real
Time Execution

Intelligent tool orchestration

The agent analyzes each query, selects the optimal tool, executes it, and returns synthesized results — all autonomously.

🔍

Web Search

Real-time web search to fetch current information, news, and answers from across the internet.

💻

Code Execution

Execute Python code in a sandboxed environment. Run scripts, test logic, and compute results on the fly.

🔢

Math Engine

Evaluate mathematical expressions with precision. Supports arithmetic, algebra, and scientific functions.

🌐

Web Scraping

Extract structured content from any URL. Parse HTML, pull text, and retrieve page data programmatically.

Auto Tool Selection

Cohere Command R+ reasons about your query and selects the right tool without manual configuration.

📈

Multi-Turn Memory

Maintains conversation context across turns, enabling follow-up questions and iterative exploration.

How it works

A linear pipeline from query to synthesized response, with intelligent branching at the tool selection layer.

Input
User Query
LLM
Cohere Command R+
Router
Tool Selector
Web Search
Code Exec
Math
Scraper
Output
Response Synthesis

Available tools

Each tool is registered with a schema that the LLM uses to decide when and how to invoke it.

web_search Search the web for real-time information using a query string Search
execute_code Run Python code in a sandboxed environment and return output Compute
calculate Evaluate mathematical expressions with scientific precision Math
scrape_url Extract and parse content from a given URL Scrape

Up and running in minutes

Clone, install, configure your API key, and start the agent.

# Clone the repository
git clone https://github.com/BabyChrist666/cohere-multi-tool-agent.git
cd cohere-multi-tool-agent

# Install dependencies
pip install -r requirements.txt

# Set your Cohere API key
export COHERE_API_KEY="your-api-key"
# Start the multi-tool agent
python main.py

# Or run with FastAPI server
uvicorn app:app --reload --port 8000

# Agent is now ready for queries
# Visit http://localhost:8000/docs for API docs
# Example: The agent auto-selects the right tool

> "What is the mass of Jupiter in kilograms?"
  ↳ Tool: calculate
  ↳ Result: 1.898 × 10^27 kg

> "Search for the latest news on AI agents"
  ↳ Tool: web_search
  ↳ Result: [synthesized search results]

> "Scrape the title from https://example.com"
  ↳ Tool: scrape_url
  ↳ Result: "Example Domain"

Built with

A focused set of technologies chosen for reliability, speed, and developer experience.

Python Cohere Command R+ FastAPI asyncio BeautifulSoup NumPy

Start building with the agent

Clone the repo, plug in your Cohere API key, and let the agent handle the rest.