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.2.tar.gz (11.0 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.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tau_hub-0.1.2.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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.2.tar.gz
Algorithm Hash digest
SHA256 4c72fa57e352312dbef2a24f863a3d9f7cf353405614de2a71edd0f0b6d65416
MD5 17d6e852e1397cab76ce6e50f28aa598
BLAKE2b-256 23b06b5aa02afd3816426ac3f0f4336aa1db4c04e8f72ba1300d1a0483b2bed6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tau_hub-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3cc0052652307b6f3cdb7a36aadfd2f88b307ff36c51d9683dffe8a197746eb7
MD5 5ddcb432ee6fc0af3dbebf45d8979d69
BLAKE2b-256 1538a82cc223bc620d759751842971cc9d3657690264b15ca94e920179ddb576

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