Skip to main content

DoDo - A stateful agentic framework

Project description

dodo

PyPI version License: MIT

A stateful agentic framework for building AI agents.

Installation

pip install dodoai
pip install dodoai[gemini]  # With Gemini support

Quick Start

from dodo import Agent, Gemini

agent = Agent(llm=Gemini(), tools=[...], observe=my_observe_fn)

await agent.do("perform some task")
value = await agent.tell("some information")
ok = await agent.check("some condition is true")

Features

Three simple methods

await agent.do("fill out the form and submit")     # Do a task
username = await agent.tell("the logged in user")  # Get information
ok = await agent.check("user is logged in")        # Check a condition

Stateful agents

# Agent remembers context across tasks
await agent.do("go to amazon.com")
await agent.do("search for laptop")
await agent.do("add first result to cart")

Structured output

class ProductInfo(BaseModel):
    name: str
    price: float

product = await agent.tell("product information", schema=ProductInfo)

Verdicts with reasons

ok = await agent.check("cart has 3 items")
if ok:
    print("Success!")
else:
    print(f"Failed: {ok.reason}")

Observation function

async def observe():
    """Return current environment state."""
    return [Text(text="Current page: checkout")]

agent = Agent(llm=llm, tools=tools, observe=observe)

Error handling

try:
    await agent.do("complete checkout")
except TaskAbortedError as e:
    print(f"Task failed: {e}")

Supported LLMs

from dodo import Gemini

Gemini(model="gemini-2.5-flash")  # Default
Gemini(model="gemini-2.5-pro")    # Pro model

Creating Tools

from dodo import Tool, ToolResult, ToolResultStatus
from pydantic import BaseModel, Field

class SearchTool(Tool):
    name = "search"
    description = "Search for information"

    class Params(BaseModel):
        query: str = Field(description="Search query")

    async def execute(self, params):
        results = do_search(params.query)
        return ToolResult(
            name=self.name,
            status=ToolResultStatus.SUCCESS,
            description=f"Found {len(results)} results",
        )

License

MIT

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

dodoai-0.1.0.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

dodoai-0.1.0-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file dodoai-0.1.0.tar.gz.

File metadata

  • Download URL: dodoai-0.1.0.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dodoai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3bce88140783752703813bb2de791254f31b2c8e55b147154a58524b403d72bf
MD5 8210e2c1bad4c85890ca3ec4c9da64ef
BLAKE2b-256 37e20141be44f67f293c7d96d03344e72c97528fbd12d7275ca6f089b34332d3

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on steve-z-wang/dodo

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

File details

Details for the file dodoai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dodoai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dodoai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba3520c032606ec59412545f6886357d6be62a51e9f683de0c6bb3768a814ec2
MD5 1a08d19370c26d76b151f511fc1c2043
BLAKE2b-256 234688edbb1ca4b736abc2911775ab99e3c4322d591341fbf00373983010ada2

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on steve-z-wang/dodo

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