Skip to main content

Daita Agents - Data focused AI agent framework with free local use and premium hosted enterprise features

Project description

Daita Agents

Open-source Python SDK for building production AI agents.

Daita Agents gives you a clean, minimal API for autonomous tool-calling agents that work with any LLM provider — OpenAI, Anthropic, Gemini, Grok, and more. Zero-configuration tracing, pluggable data sources, and a composable workflow system for multi-agent pipelines.

License Python PyPI


Quickstart

pip install daita-agents
import asyncio
from daita import Agent, tool

@tool
def get_weather(city: str) -> str:
    """Get current weather for a city."""
    return f"Sunny, 72°F in {city}"

async def main():
    agent = Agent(
        name="assistant",
        llm_provider="openai",
        model="gpt-4o",
        tools=[get_weather],
    )

    result = await agent.run("What's the weather in Tokyo?")
    print(result)

asyncio.run(main())

Features

  • Multi-provider LLM support — OpenAI, Anthropic, Gemini, Grok (or bring your own)
  • Autonomous tool calling — agents plan and execute multi-step tool chains without manual orchestration
  • @tool decorator — turn any Python function into an LLM-callable tool in one line
  • Streaming — real-time event-based output via on_event callback
  • Plugin ecosystem — PostgreSQL, MySQL, MongoDB, S3, Slack, Elasticsearch, Pinecone, ChromaDB, Neo4j, MCP, and more
  • Memory — persistent agent memory with local or custom backends
  • Workflows — connect multiple agents into pipelines via relay channels
  • Zero-config tracing — every LLM call and tool execution is automatically traced (tokens, latency, cost)
  • Retry & reliability — configurable exponential backoff with permanent-error detection
  • Focus DSL — pre-filter tool results before the LLM sees them, reducing token usage

Examples

Custom tools with @tool

import asyncio
from daita import Agent, tool

@tool
def search_products(query: str, max_results: int = 5) -> list:
    """Search the product catalog.

    Args:
        query: Search terms
        max_results: Maximum number of results to return
    """
    # your real implementation here
    return [{"name": "Widget A", "price": 9.99}]

@tool
def calculate_discount(price: float, pct: float) -> float:
    """Calculate a discounted price."""
    return round(price * (1 - pct / 100), 2)

async def main():
    agent = Agent(
        name="Shopping Assistant",
        llm_provider="openai",
        model="gpt-4o",
        tools=[search_products, calculate_discount],
    )

    result = await agent.run("Find me a widget and apply a 15% discount.")
    print(result)

asyncio.run(main())

Tool-calling agent with a database

import asyncio
from daita import Agent
from daita.plugins import postgresql

async def main():
    agent = Agent(
        name="Sales Analyst",
        llm_provider="openai",
        model="gpt-4o",
    )

    agent.add_plugin(postgresql(
        host="localhost",
        database="sales_db",
        user="analyst",
        password="secret",
    ))

    result = await agent.run("What were the top 5 products by revenue last quarter?")
    print(result)

asyncio.run(main())

Streaming output

import asyncio
from daita import Agent
from daita.core.streaming import EventType

async def main():
    agent = Agent(name="assistant", llm_provider="openai", model="gpt-4o")

    def on_event(event):
        if event.type == EventType.THINKING:
            print(event.content, end="", flush=True)
        elif event.type == EventType.TOOL_CALL:
            print(f"\n[calling {event.tool_name}]")
        elif event.type == EventType.COMPLETE:
            print(f"\n\nDone. Tokens used: {event.token_usage}")

    await agent.run("Explain transformer attention mechanisms", on_event=on_event)

asyncio.run(main())

Multi-agent workflow

import asyncio
from daita import Agent, Workflow

async def main():
    fetcher  = Agent(name="Data Fetcher",  llm_provider="openai", model="gpt-4o")
    analyzer = Agent(name="Analyzer",      llm_provider="openai", model="gpt-4o")

    workflow = Workflow("Sales Pipeline")
    workflow.add_agent("fetcher",  fetcher)
    workflow.add_agent("analyzer", analyzer)
    workflow.connect("fetcher", "raw_data", "analyzer")

    await workflow.start()
    await workflow.inject_data("fetcher", {"query": "Q3 sales"}, task="fetch")
    await workflow.stop()

asyncio.run(main())

Memory-enabled agent

import asyncio
from daita import Agent
from daita.plugins.memory import MemoryPlugin

async def main():
    agent = Agent(name="Assistant", llm_provider="anthropic", model="claude-sonnet-4-6")
    agent.add_plugin(MemoryPlugin())

    # Memory persists across calls
    await agent.run("My name is Alex and I prefer concise answers.")
    result = await agent.run("What's my preference?")
    print(result)

asyncio.run(main())

Vector database search

import asyncio
from daita import Agent
from daita.plugins import chroma

async def main():
    agent = Agent(name="Knowledge Assistant", llm_provider="openai", model="gpt-4o")

    agent.add_plugin(chroma(
        path="./vectors",
        collection="docs",
    ))

    result = await agent.run("What do our docs say about authentication?")
    print(result)

asyncio.run(main())

MCP (Model Context Protocol) integration

import asyncio
from daita import Agent
from daita.plugins import mcp

async def main():
    agent = Agent(
        name="File Analyst",
        llm_provider="openai",
        model="gpt-4o",
        mcp=mcp.server(command="uvx", args=["mcp-server-filesystem", "/data"]),
    )

    result = await agent.run("Read report.csv and summarize the totals.")
    print(result)

asyncio.run(main())

Plugins

Databases

Plugin Description Extra
postgresql Query and write PostgreSQL [postgresql]
mysql Query and write MySQL [mysql]
mongodb Query MongoDB collections [mongodb]
snowflake Query Snowflake data warehouse [snowflake]
elasticsearch Search Elasticsearch indices [elasticsearch]

Vector Databases

Plugin Description Extra
chroma Local/embedded vector search [chromadb]
pinecone Managed cloud vector search [pinecone]
qdrant Self-hosted vector search [qdrant]

Integrations & Cloud

Plugin Description Extra
rest Call REST APIs (included)
s3 Read/write S3 objects [aws]
slack Send Slack messages [slack]
email Send/receive email (SMTP/IMAP) (included)
websearch AI-optimized web search (Tavily) [websearch]
mcp Model Context Protocol servers [mcp]
redis_messaging Redis pub/sub messaging [redis]
neo4j Graph database (Cypher queries) [neo4j]

Knowledge & Orchestration

Plugin Description
memory Persistent semantic agent memory
catalog Schema discovery and metadata management
lineage Data lineage tracking and impact analysis
orchestrator Multi-agent coordination and task routing

Installation

Core (OpenAI included)

pip install daita-agents

Add LLM providers

pip install "daita-agents[anthropic]"   # Claude
pip install "daita-agents[google]"      # Gemini
pip install "daita-agents[llm-all]"     # All LLM providers

Add database plugins

pip install "daita-agents[postgresql]"
pip install "daita-agents[mysql]"
pip install "daita-agents[mongodb]"
pip install "daita-agents[databases]"   # All traditional databases

Add vector database plugins

pip install "daita-agents[chromadb]"
pip install "daita-agents[pinecone]"
pip install "daita-agents[qdrant]"
pip install "daita-agents[vectordb]"    # All vector databases

Bundles

pip install "daita-agents[recommended]"  # Anthropic + pandas + beautifulsoup4
pip install "daita-agents[complete]"     # Most features, no heavy packages
pip install "daita-agents[all]"          # Everything (large install)

Documentation

See the examples/ directory for full working examples, or the documentation.


Contributing

See CONTRIBUTING.md. All contributions are welcome.

License

Apache 2.0 — see LICENSE.


Built by Daita

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

daita_agents-0.11.0.tar.gz (329.7 kB view details)

Uploaded Source

Built Distribution

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

daita_agents-0.11.0-py3-none-any.whl (392.0 kB view details)

Uploaded Python 3

File details

Details for the file daita_agents-0.11.0.tar.gz.

File metadata

  • Download URL: daita_agents-0.11.0.tar.gz
  • Upload date:
  • Size: 329.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for daita_agents-0.11.0.tar.gz
Algorithm Hash digest
SHA256 aed4901c24a712442c4ad90e3f5183cdfe20efb446156f96ea1abbf9bb293a67
MD5 e805aa9c2412bb1c2979b5fe173db1b9
BLAKE2b-256 1eec25bf1614f5452ad351051bc9b0fa258d2e1f1cb6b156c8a5d57ed3131438

See more details on using hashes here.

File details

Details for the file daita_agents-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: daita_agents-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 392.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for daita_agents-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 addde6f2d18e7c42c7928ed43052a0256138446fa42c14d8278feb484d171f80
MD5 71971e18f7214b170e68a93e6f956849
BLAKE2b-256 284a47f4c251037a67809c173218077a1d8a9cd3c103581d701c702cd1987554

See more details on using hashes here.

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