Skip to main content

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 session
  • agent.instruct(instruction: str) - Send single instruction
  • Agent.from_name(name: str) - Load predefined agent
  • Agent.from_markdown(path: str) - Load agent from markdown
  • Agent.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 package
  • tests/ - Test suite
  • pyproject.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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Install development dependencies (uv sync --all-groups)
  4. Install pre-commit hooks (uv run pre-commit install)
  5. Make your changes
  6. Run all quality checks (uv run pre-commit run --all-files)
  7. Commit your changes (git commit -m 'Add amazing feature')
  8. Push to the branch (git push origin feature/amazing-feature)
  9. Open a Pull Request

Note: Pull requests will automatically be formatted by our CI. Ensure all linting and type checking passes.

Support

Changelog

See CHANGELOG.md for version history.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vindao_agents-0.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vindao_agents-0.1.0-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

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

Hashes for vindao_agents-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a57e76c603b7dd5c8521a0816cfb1371339b42c4b807525262eb53fdeba31f9b
MD5 685cb1dbd402b5bc7de960d899e1b6d9
BLAKE2b-256 27899e92c9693c45eaf902f4456c159d9d4bf1f796737287f3d15431c262964e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vindao_agents-0.1.0.tar.gz:

Publisher: publish.yml on OscarLawrence/vindao_agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for vindao_agents-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f9e5a34359da24e30ab14682ed4941a5bc6796f9e8a00f4171e1ea42048d3a5
MD5 273d3bc8521fe609ea76e9b579827cf2
BLAKE2b-256 eaca7c9fdbe809c621e410318c6725322a01862cf98cd695ba264605a9420bae

See more details on using hashes here.

Provenance

The following attestation bundles were made for vindao_agents-0.1.0-py3-none-any.whl:

Publisher: publish.yml on OscarLawrence/vindao_agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page