Skip to main content

HippoDb Agent SDK

Python SDK for building AI agents backed by HippoDb.

Homepage: https://luthen.ai/

This package is designed for developers who want to build custom agents with:

  • an LLM tool-use loop
  • persistent memory in HippoDb
  • configurable business tools
  • optional rule enforcement, gateway, and networking features

What This SDK Provides

  • AgentRunner to boot and run an agent
  • RoleConfig to define agent identity and prompt behavior
  • BaseTool to define business-domain tools
  • AgentSettings to configure runtime behavior
  • built-in memory, OS, and calculator tools
  • HippoDb-backed memory client and memory seeding support
  • BaseAgent for hosts that serve their own web or API transport (streaming, stop, per-message reasoning effort)

Documentation

I want to... Read
Use the SDK in a Cradle agent docs/cradle-sdk-guide.html (open in a browser)
See what is new in 2.0.0 and how to upgrade docs/releases/release-notes-2.0.0.html (open in a browser)
Serve an agent from my own web or API service docs/technical/host-integration.md
Choose models, keys, retries, reasoning effort docs/technical/llm-routing.md
Stream text, add a stop button docs/technical/events-and-streaming.md
Look up any class, method or setting docs/technical/agent-sdk-technical-reference.md

The full list is in docs/README.md. The documents ship inside the package: after pip install, run python -m hippodb_agent docs to find them, or python -m hippodb_agent docs --open to open the release notes.

Core Concepts

1. Role

A role defines what the agent is, which tools it can see, and how it should behave.

2. Tools

Tools are Python classes that inherit from BaseTool. They are how the agent interacts with external systems.

3. Runner

AgentRunner wires together the LLM, tools, HippoDb, configuration, and terminal runtime.

4. Memory

HippoDb acts as the persistent memory layer for concepts, rules, and conversation continuity.

Installation

pip install hippodb-agent-sdk

For local development against a source checkout:

pip install -e .

Configuration

Configuration is loaded from:

  1. the defaults in AgentSettings (src/hippodb_agent/config.py)
  2. local .env
  3. environment variables

Important settings include:

  • LLM_API_KEY
  • ANTHROPIC_API_KEY
  • HIPPODB_URL
  • HIPPODB_API_KEY (only when HippoDb sits behind a manager that enforces API keys)
  • MODEL
  • LLM_REASONING_EFFORT (low, medium or high; empty uses the model's default)
  • HISTORY_WINDOW, MAX_TOTAL_TOOLS, MAX_ROUNDS (how much one LLM call carries)

Every setting is listed in section 17 of the technical reference.

Example .env:

LLM_API_KEY=your_key_here
HIPPODB_URL=http://localhost:7700
MODEL=anthropic/claude-sonnet-4-20250514

Minimal Example

Create a small agent with one custom tool.

tools.py

from hippodb_agent import BaseTool


class HelloTool(BaseTool):
    name = "demo_hello"
    description = "Return a hello message"
    input_schema = {
        "type": "object",
        "properties": {},
        "required": [],
    }

    async def execute(self, inp: dict) -> dict:
        return {"message": "hello from HippoDb Agent SDK"}

role.py

from hippodb_agent import RoleConfig


MY_ROLE = RoleConfig(
    name="demo_agent",
    display_name="Demo Agent",
    tool_scopes=["demo_"],
    fabric="demo_agent",
    system_prompt="You are a helpful demo agent.\n\n{manifest}",
)

main.py

from hippodb_agent import AgentRunner
from role import MY_ROLE
from tools import HelloTool


runner = AgentRunner(
    role=MY_ROLE,
    business_tools=[HelloTool],
)


if __name__ == "__main__":
    runner.start()

Run it with:

python main.py

Building a New Agent

For a typical agent project, you usually create:

  • tools.py for business-domain tools
  • role.py for RoleConfig
  • main.py as the startup entry point
  • seed.yaml for pre-education
  • test_suite.py or tests for validation

Example Tool

from hippodb_agent import BaseTool


class ListEmployees(BaseTool):
    name = "hr_list_employees"
    description = "List all employees"
    input_schema = {"type": "object", "properties": {}, "required": []}
    backend = "hr"

    async def execute(self, inp: dict) -> dict:
        r = await self.api.get("/employees")
        r.raise_for_status()
        return r.json()

Example Runner With Backend

from hippodb_agent import AgentRunner
from role import MY_ROLE
from tools import ListEmployees


runner = AgentRunner(
    role=MY_ROLE,
    business_tools=[ListEmployees],
    api_base_url="http://localhost:9000",
    seed_file="seed.yaml",
)


if __name__ == "__main__":
    runner.start()

Public SDK Surface

The intended primary imports are:

from hippodb_agent import (
    AgentSettings,
    RoleConfig,
    AgentRunner,
    BaseTool,
    ApiClients,
)

Typed errors, all importable from hippodb_agent: HippoDbError, HippoTimeoutError, FabricNotFoundError, EngineCapabilityRemovedError, and LlmError with its subclasses (LlmRateLimitError, LlmOverloadedError, LlmConnectionError, LlmTimeoutError, LlmAuthError, LlmContextWindowError, LlmBadRequestError).

A host that builds the agent itself (instead of using AgentRunner) also uses from hippodb_agent.core.agent import BaseAgent, from hippodb_agent.memory.client import HippoClient, from hippodb_agent.tools.registry import ToolRegistry and from hippodb_agent.tools.discovery import ToolDiscovery; see the host-integration guide.

Additional helper exports currently include:

  • get_os_tools
  • get_calc_tools
  • BaseMemoryFormatter
  • get_formatter
  • DataGateway
  • MaskStrategy
  • FieldPolicy
  • AgentNetwork

Runtime Behavior

Installing this package does not start any worker or background service.

Runtime behavior begins only when your application starts an agent, typically through AgentRunner.start().

Depending on configuration, startup may:

  • connect to HippoDb
  • create or reuse a fabric
  • seed memory from seed.yaml
  • connect to the optional agent network

Notes

  • This repository currently includes some optional subsystems beyond the core SDK, such as networking, gateway/compliance, and monitoring.
  • The primary use of the package is as an SDK for building custom agents.
  • See CHANGELOG.md for release history and docs/releases/release-notes-2.0.0.html for the 2.0.0 feature overview and upgrade guide.
  • Bundled utility applications may exist in the repository, but they are not required for SDK usage.

Development

Useful local commands:

pip install -e .[dev]
pytest

License

This SDK is distributed under the PolyForm Noncommercial License 1.0.0. In short:

  • Free to install, run, modify, and evaluate for any noncommercial purpose (personal projects, research, internal evaluation, etc.)
  • Any commercial use requires a separate license from us.

See LICENSE for the full terms.

For commercial licensing inquiries, contact darshana@behaviol.com.

This technology is created and owned by Behaviol Pvt Ltd, distributed under the product name Luthen (https://luthen.ai/).

Metadata

Release files for hippodb-agent-sdk 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hippodb-agent-sdk 2.0.0
File Size Uploaded Provenance
hippodb_agent_sdk-2.0.0.tar.gz 344.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hippodb-agent-sdk 2.0.0
File Interpreter ABI Platform
hippodb_agent_sdk-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 719.2 kB

Release files / hippodb_agent_sdk-2.0.0.tar.gz

Download URL hippodb_agent_sdk-2.0.0.tar.gz
Size 344.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6e5a4710ce1d8631d76f11341182aa9cb6337ecd8be679e437f5b8ce281716ce
BLAKE2b-256 checksum
How to use checksums
380afa93389b3e3869510abd8e8a7762601964c557cc45bfed7e362e7f0d19b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / hippodb_agent_sdk-2.0.0-py3-none-any.whl

Download URL hippodb_agent_sdk-2.0.0-py3-none-any.whl
Size 374.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f7ec9646f5d6abee3825f189cb3d7af8b802dc033cedfccd63fa004a15de618
BLAKE2b-256 checksum
How to use checksums
162fa28f9b99bb79247fea8dbc423c94c866545345a147ad4336e92774db7424
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for hippodb-agent-sdk 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page