Skip to main content

Cross-service agent registry for tau_agent — create, store, and retrieve agents, tools, and skills from a database.

Project description

tau_hub

A cross-service persistence and registry layer for tau_agent — the portable harness layer of the tau coding agent.

tau_hub adds a shared database layer so multiple services can create, load, and share agents, tools, and skills — without duplicating configuration or bootstrapping logic across processes.


Why

tau_agent is intentionally stateless and portable — it has no file I/O, no CLI, and no resource-loading. tau_hub fills that gap for multi-service environments: it owns the storage layer and exposes a clean API for agent lifecycle management.


Features

  • create_agent(...) — define and persist a new agent with its tools and skills
  • get_agent(name) — load a fully configured tau_agent harness from the database
  • register_tool(...) — store a tool definition (name, description, schema)
  • get_skill(name) — retrieve a skill prompt/config by name
  • Backend-agnostic — pluggable AgentStore interface; ships with TinyDB by default
  • Zero-dependency quick-start — TinyDB backend requires no external services

Installation

# Default install — TinyDB backend (pure Python, zero external dependencies)
pip install tau-hub

# With MongoDB support
pip install tau-hub[mongo]

# With Redis support
pip install tau-hub[redis]

# With PostgreSQL support
pip install tau-hub[postgres]

# Everything
pip install tau-hub[all]

Or from source:

git clone https://github.com/mmpouya/tau_hub
cd tau_hub
pip install -e .

Quick Start

import asyncio
from tau_hub import TauRegistry
from tau_ai.anthropic import AnthropicProvider
from tau_ai.env import AnthropicConfig
from tau_agent.harness import AgentHarness, AgentHarnessConfig

async def main():
    # Default: TinyDB backend, stores data in tau_hub.json
    registry = TauRegistry()

    # get provider or agent
    provider = registry.get_provider("gemma-4")
    harness_config = AgentHarnessConfig(
            provider=provider,
            model=provider.model,
            system=registry.get_agent("personal_query_agent"),
            tools=[registry.get_tool(name=get_weather)]
        )
    # Initialize the Harness
    harness = AgentHarness(harness_config)

    # Prompt the agent and react to events
    print("User: Hello, who are you?")
    async for event in harness.prompt("Hello, who are you?"):
        ...

    
    # Persist an agent definition
    await registry.create_agent(
        name="weather_agent",
        system="You are a helpful weather assistant.",
        tools=["get_weather"],
        skills=["metric_units"],
    )


asyncio.run(main())

Using a different backend

from tau_hub import TauRegistry
from tau_hub.db.mongo import MongoStore

registry = TauRegistry(store=MongoStore(uri="mongodb://localhost:27017", db="tau"))

Architecture

┌─────────────┐     ┌─────────────┐     ┌───────────────┐
│  Service A  │     │  Service B  │     │   Service C   │
└──────┬──────┘     └──────┬──────┘     └────────┬──────┘
       │                   │                     │
       └───────────────────┼─────────────────────┘
                           │
                    ┌──────▼──────┐
                    │   tau_hub   │  ← this package
                    └──────┬──────┘
                           │
              ┌────────────┼────────────┐
              │            │            │
       ┌──────▼──┐  ┌──────▼──┐  ┌─────▼─────┐
       │ TinyDB  │  │ MongoDB │  │ Postgres  │  ...
       │(default)│  │         │  │  / Redis  │
       └─────────┘  └─────────┘  └───────────┘

tau_hub depends on an abstract AgentStore interface. The public API (create_agent, get_agent, etc.) calls only this interface — never a concrete backend directly. You swap backends by passing a different store= at construction time.

Collections

All entities are stored as flat, independent documents — no relational joins needed:

Collection Key Value
agents name {system, tools: [...], skills: [...]}
tools name {description, schema}
skills name {prompt, config}

Backends

TinyDB (default)

Pure-Python JSON document store. No external service required. Best for single-process or single-writer deployments.

⚠️ TinyDB is not ACID-compliant and does not handle concurrent writes safely across multiple processes. If you run multiple workers writing to the same database simultaneously, use the SQLite or Postgres backend instead.

from tau_hub.db.tinydb import TinyDBStore
store = TinyDBStore(path="tau_hub.json")

MongoDB (requires tau-hub[mongo])

from tau_hub.db.mongo import MongoStore
store = MongoStore(uri="mongodb://localhost:27017", db="tau")

Redis (requires tau-hub[redis])

Stores documents as JSON-serialized hash fields. Suitable when Redis is already in your stack and you want sub-millisecond reads.

from tau_hub.db.redis import RedisStore
store = RedisStore(url="redis://localhost:6379", prefix="tau")

PostgreSQL (requires tau-hub[postgres])

Uses a single documents table with (collection, name, data jsonb). Good for multi-process concurrent writes.

from tau_hub.db.postgres import PostgresStore
store = PostgresStore(dsn="postgresql://user:pass@localhost/tau")

Implementing a Custom Backend

Subclass AgentStore from tau_hub.db.base:

from tau_hub.db.base import AgentStore

class MyStore(AgentStore):
    async def get(self, collection: str, name: str) -> dict | None: ...
    async def put(self, collection: str, name: str, data: dict) -> None: ...
    async def delete(self, collection: str, name: str) -> None: ...
    async def batch_get(self, collection: str) -> list[dict]: ...

License

MIT

feature development:

  • encryption of api_keys
  • seesion handling on db, instead of jsonl
  • update endpoint for agents, tools, providers.
  • add skills (need updating code_agent)

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

tau_hub-0.1.21.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

tau_hub-0.1.21-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file tau_hub-0.1.21.tar.gz.

File metadata

  • Download URL: tau_hub-0.1.21.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tau_hub-0.1.21.tar.gz
Algorithm Hash digest
SHA256 11caf0de373b8ab0d7ee0635809c4d8f52b54d2936f692efa8c29535a7ae49a8
MD5 2ef24a95016795501528f84c674ef81b
BLAKE2b-256 5dd46eed1f75bd62b1fd6e70d12d0ed64f958db181c4396e958278ca318670d7

See more details on using hashes here.

File details

Details for the file tau_hub-0.1.21-py3-none-any.whl.

File metadata

  • Download URL: tau_hub-0.1.21-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for tau_hub-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 2040d1547513b43134a70ecf00d811f710e0a57b1e62ce7e157db61c41789fc5
MD5 7b5d18ed516a97944576dc68801a212a
BLAKE2b-256 c39c36dd1e38e435ae7e5bf38118d8fc04e4f57004276e3bebe218d88e5afd81

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