An extensible AI agent framework for building interactive, tool-enabled conversational agents with streaming support
Project description
Vindao Agents
An extensible AI agent framework for building interactive, tool-enabled conversational agents with streaming support.
Features
- ๐ค Multiple Agent Support - Create and manage different AI agents with unique behaviors and capabilities
- ๐ง Tool Integration - Easily add custom tools (bash commands, file operations, etc.) to your agents
- ๐ฌ Interactive Chat - Built-in CLI for interactive conversations with your agents
- ๐ Markdown Configuration - Define agents using simple markdown files with YAML frontmatter
- ๐ Session Management - Save and resume conversations with persistent state
- โก Streaming Responses - Real-time streaming output with rich formatting
- ๐ฏ Multiple LLM Support - Works with OpenAI, Anthropic, Ollama, and more via LiteLLM
- ๐ Extensible Architecture - Plugin-based system for inference adapters, tool parsers, and storage
Installation
Install from PyPI:
pip install vindao_agents
Or using uv (recommended):
uv pip install vindao_agents
For development installation:
git clone https://github.com/vindao/vindao_agents.git
cd vindao_agents
uv pip install -e ".[dev]"
Quick Start
Using the CLI
Start a chat with the default agent:
agent
Use a specific agent:
agent --agent Developer
List available agents:
agent --list
Resume a previous session:
agent --resume <session-id>
Using the Python API
from vindao_agents import Agent
# Create an agent from a predefined template
agent = Agent.from_name("DefaultAgent")
# Start an interactive chat
agent.chat()
Creating Custom Agents
Agents are defined using markdown files with YAML frontmatter. Create a file named MyAgent.md:
---
provider: openai
model: gpt-4
tools:
- tools.bash
- tools.file_ops
tools_with_source: false
---
You are a helpful assistant with expertise in software development.
You value clean code and best practices.
Then use it:
from vindao_agents import Agent
agent = Agent.from_markdown("MyAgent.md")
agent.chat()
Configuration
Agent Configuration
- provider: LLM provider (openai, anthropic, ollama, etc.)
- model: Model identifier
- tools: List of tool modules to enable
- tools_with_source: Include source code in tool descriptions
- max_iterations: Maximum reasoning iterations
- auto_save: Automatically save session state
Environment Variables
Configure your LLM API keys:
export OPENAI_API_KEY="your-key"
export ANTHROPIC_API_KEY="your-key"
# Or use .env file
Custom data directory:
export USER_DATA_DIR="/path/to/data"
Available Tools
Built-in Tools
- bash - Execute shell commands
- file_ops - File operations (read, write, search, etc.)
Adding Custom Tools
from vindao_agents import Agent, Tool
def my_custom_tool(query: str) -> str:
"""
My custom tool description.
Args:
query: The query parameter
Returns:
The result
"""
return f"Processed: {query}"
agent = Agent(
name="CustomAgent",
tools=["tools.bash"], # Use existing tools
)
# Add custom tool
agent.tools["my_tool"] = Tool(my_custom_tool)
agent.chat()
API Reference
Agent Class
Agent(
name: str = 'Momo',
provider: str = 'ollama',
model: str = 'qwen2.5:0.5b',
tools: list[str] = [],
behavior: str = "",
max_iterations: int = 15,
auto_save: bool = True,
)
Methods
agent.chat()- Start interactive chat sessionagent.instruct(instruction: str)- Send single instructionAgent.from_name(name: str)- Load predefined agentAgent.from_markdown(path: str)- Load agent from markdownAgent.from_session_id(session_id: str)- Resume session
Architecture
vindao_agents/
โโโ Agent.py # Main agent orchestrator
โโโ Tool.py # Tool wrapper
โโโ models/ # Data models
โ โโโ agent.py
โ โโโ messages.py
โ โโโ tool.py
โโโ InferenceAdapters/ # LLM provider adapters
โโโ ToolParsers/ # Tool call parsing
โโโ AgentStores/ # State persistence
โโโ tools/ # Built-in tools
โ โโโ bash.py
โ โโโ file_ops/
โโโ agents/ # Predefined agents
โ โโโ DefaultAgent.md
โ โโโ Developer.md
โ โโโ ...
โโโ utils/ # Utilities
Examples
Programmatic Agent Usage
from vindao_agents import Agent
# Create agent with custom configuration
agent = Agent(
name="CodeReviewer",
provider="anthropic",
model="claude-sonnet-4-5",
tools=["tools.file_ops"],
behavior="You are a code reviewer focused on quality and security.",
max_iterations=10
)
# Process instruction with streaming
for chunk, chunk_type in agent.instruct("Review the authentication code"):
if chunk_type == "content":
print(chunk, end="", flush=True)
Custom Tool Module
Create my_tools.py:
def search_database(query: str) -> str:
"""
Search the database for information.
Args:
query: Search query
Returns:
Search results
"""
# Your implementation
return f"Results for: {query}"
def analyze_data(data_id: str) -> dict:
"""
Analyze data by ID.
Args:
data_id: Data identifier
Returns:
Analysis results
"""
return {"status": "analyzed", "id": data_id}
Use in agent:
---
provider: openai
model: gpt-4
tools:
- my_tools
---
You are a data analysis assistant.
Development
Development Setup
git clone https://github.com/vindao/vindao_agents.git
cd vindao_agents
uv sync --all-groups
Install Pre-commit Hooks
uv run pre-commit install
This will automatically run linting checks before each commit.
Running Tests
# Run tests with coverage
uv run pytest
# Run tests in verbose mode
uv run pytest -v
# Run specific test file
uv run pytest tests/test_agent.py
Code Quality
This project uses comprehensive code quality tools:
Linting & Formatting
# Run Ruff linter
uv run ruff check src tests
# Auto-fix linting issues
uv run ruff check --fix src tests
# Format code
uv run ruff format src tests
# Check formatting without changes
uv run ruff format --check src tests
Type Checking
# Run MyPy type checker
uv run mypy src
Security Scanning
# Run Bandit security scanner
uv run bandit -c pyproject.toml -r src
Run All Checks
# Run everything that CI runs
uv run ruff check src tests
uv run ruff format --check src tests
uv run mypy src
uv run bandit -c pyproject.toml -r src
uv run pytest
Pre-commit
Pre-commit hooks run automatically before each commit:
- Trailing whitespace removal
- End-of-file fixing
- YAML/JSON/TOML validation
- Ruff linting and formatting
- MyPy type checking
- Bandit security scanning
To run manually:
uv run pre-commit run --all-files
Project Structure
src/vindao_agents/- Main packagetests/- Test suitepyproject.toml- Project configuration.pre-commit-config.yaml- Pre-commit hooks.github/workflows/- CI/CD workflows
License
This project is licensed under a Custom License with commercial profit-sharing requirements. See LICENSE for details.
Summary:
- โ Free for non-commercial use
- โ Modify and distribute freely
- โ ๏ธ Commercial use requires 1% profit-sharing agreement
For commercial licensing inquiries, contact: vindao@outlook.com
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Contributing Guidelines
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Install development dependencies (
uv sync --all-groups) - Install pre-commit hooks (
uv run pre-commit install) - Make your changes
- Run all quality checks (
uv run pre-commit run --all-files) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Note: Pull requests will automatically be formatted by our CI. Ensure all linting and type checking passes.
Support
- GitHub Issues: https://github.com/vindao/vindao_agents/issues
- Email: vindao@outlook.com
Changelog
See CHANGELOG.md for version history.
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 vindao_agents-0.1.0.tar.gz.
File metadata
- Download URL: vindao_agents-0.1.0.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a57e76c603b7dd5c8521a0816cfb1371339b42c4b807525262eb53fdeba31f9b
|
|
| MD5 |
685cb1dbd402b5bc7de960d899e1b6d9
|
|
| BLAKE2b-256 |
27899e92c9693c45eaf902f4456c159d9d4bf1f796737287f3d15431c262964e
|
Provenance
The following attestation bundles were made for vindao_agents-0.1.0.tar.gz:
Publisher:
publish.yml on OscarLawrence/vindao_agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vindao_agents-0.1.0.tar.gz -
Subject digest:
a57e76c603b7dd5c8521a0816cfb1371339b42c4b807525262eb53fdeba31f9b - Sigstore transparency entry: 768521387
- Sigstore integration time:
-
Permalink:
OscarLawrence/vindao_agents@3e4631fb8a613cdebe0aab456877b06666fec6cd -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/OscarLawrence
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3e4631fb8a613cdebe0aab456877b06666fec6cd -
Trigger Event:
push
-
Statement type:
File details
Details for the file vindao_agents-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vindao_agents-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f9e5a34359da24e30ab14682ed4941a5bc6796f9e8a00f4171e1ea42048d3a5
|
|
| MD5 |
273d3bc8521fe609ea76e9b579827cf2
|
|
| BLAKE2b-256 |
eaca7c9fdbe809c621e410318c6725322a01862cf98cd695ba264605a9420bae
|
Provenance
The following attestation bundles were made for vindao_agents-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on OscarLawrence/vindao_agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vindao_agents-0.1.0-py3-none-any.whl -
Subject digest:
5f9e5a34359da24e30ab14682ed4941a5bc6796f9e8a00f4171e1ea42048d3a5 - Sigstore transparency entry: 768521389
- Sigstore integration time:
-
Permalink:
OscarLawrence/vindao_agents@3e4631fb8a613cdebe0aab456877b06666fec6cd -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/OscarLawrence
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3e4631fb8a613cdebe0aab456877b06666fec6cd -
Trigger Event:
push
-
Statement type: