Smart AI agent with reasoning and tool use capabilities
Project description
Smart Agent
A powerful AI agent chatbot that leverages external tools through the Model Context Protocol (MCP) to extend its capabilities beyond traditional language models.
Quick Start
# Install Smart Agent
pip install smart-agent
# For web interface (Chainlit), install with web extras
pip install smart-agent[web]
# Initialize configuration
smart-agent init
# Start the CLI chat interface (connects to remote tools by default)
smart-agent chat
# OR start the web interface
smart-agent chainlit
# If you need to run your own tools locally:
smart-agent start # Start the server components
Understanding Smart Agent
Smart Agent operates in two primary modes:
1. Client Mode
Client mode provides chat interfaces that connect to MCP servers (either local or remote).
- What it does: Provides CLI or web interfaces to interact with the agent
- When to use: When you want to chat with the agent using available tools
# CLI interface
smart-agent chat
# Web interface (Chainlit)
smart-agent chainlit
2. Server Mode
Server mode manages MCP (Model Context Protocol) servers that provide tools and capabilities to the agent.
- What it does: Launches and manages tool servers that expose capabilities through standardized endpoints
- When to use: When you need to run tools locally or host tools for remote clients
# Start all server components (tools and LLM proxy)
smart-agent start
# Check status of running services
smart-agent status
# Stop all services
smart-agent stop
Connection Types
Smart Agent supports two primary connection types between clients and servers:
Local Connection (stdio)
- How it works: Direct communication through standard input/output
- When to use: For tools running locally on the same machine
- Configuration: Use
transport: stdioin your config
Remote Connection (SSE)
- How it works: Communication via Server-Sent Events over HTTP/HTTPS
- When to use: For connecting to tools running on remote machines
- Configuration: Use
transport: ssein your config
Transport Conversion
Smart Agent provides conversion mechanisms between transport types:
-
stdio_to_sse: Converts local stdio tools to SSE endpoints
- Useful for exposing local tools as network services
- Example:
transport: stdio_to_ssein config
-
sse_to_stdio: Converts remote SSE endpoints to local stdio
- Useful for using remote tools as if they were local
- Example:
transport: sse_to_stdioin config
Configuration Example
# config.yaml
llm:
base_url: "http://localhost:4000"
model: "claude-3-7-sonnet-20240229"
api_key: "api_key"
temperature: 0.0
tools:
# Local tool with stdio_to_sse conversion
mcp_think_tool:
enabled: true
url: "http://localhost:8000/sse"
command: "uvx mcp-think --sse --host 0.0.0.0"
transport: stdio_to_sse
# Remote tool
remote_tool:
enabled: true
url: "https://api.remote-tool.com/sse"
transport: sse
Common Usage Patterns
Using Remote Tools (Simplest)
# Initialize configuration
smart-agent init
# Edit config.yaml to use remote URLs
# Example: url: "https://api.remote-tool.com/sse"
# Start client interface - will automatically connect to remote tools
smart-agent chat # or chainlit
Local Development (Running Your Own Tools)
# Initialize configuration
smart-agent init
# Start server components
smart-agent start
# Start client interface
smart-agent chat # or chainlit
Prerequisites
- Python 3.9+
- Node.js and npm (for running tools via supergateway)
- Docker (optional, for container-based tools)
- API keys for language models
Installation
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install from PyPI
pip install smart-agent
# For web interface (Chainlit)
pip install smart-agent[web]
# For monitoring features
pip install smart-agent[monitoring]
For more detailed information, see the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smart_agent-0.8.0.tar.gz.
File metadata
- Download URL: smart_agent-0.8.0.tar.gz
- Upload date:
- Size: 36.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
914a9fcec931232ff3cd706890e51e97a66c4439a76c07d3b1cf3bab74e05a3b
|
|
| MD5 |
b066a019a74069af23052a05b8720189
|
|
| BLAKE2b-256 |
351a7b6b33be1d2129100191e84514c57ef18d87222162483230ca854fb422b1
|
File details
Details for the file smart_agent-0.8.0-py3-none-any.whl.
File metadata
- Download URL: smart_agent-0.8.0-py3-none-any.whl
- Upload date:
- Size: 42.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f830fd2f903be1c95b613449db532a53ff33fbdb2ec37072b216714fec035ae9
|
|
| MD5 |
11981772f1693e29dbad6a4a71d3c256
|
|
| BLAKE2b-256 |
56e8578b30b8b5c9d25c7fbff1a4c6fc0af3b130b00e3cb72e9b1f953736e5e3
|