Skip to content

Ash-Blanc/clawbridge

Repository files navigation

clawbridge logo

clawbridge

Build and deploy OpenClaw-style agents in frameworks like Agno and Agentica.

What Is clawbridge?

clawbridge is a Python toolkit for building OpenClaw-style agents inside frameworks like Agno and Agentica. Define agents in YAML, organize skills in directories, enable persistent memory and learning — then compile to framework-native objects.

Key capabilities:

  • OpenClaw workspacesAGENTS.md, MEMORY.md, BOOTSTRAP.md, skills directories
  • Hermes-like features — persistent memory, self-improvement, cross-session recall
  • Multi-agent teams — coordinate, route, broadcast, or run task lists
  • Framework-native executionbuild_agno_agent() and build_agno_team() return real Agno objects

Install

pip install clawbridge[agno]

For development:

git clone https://github.com/Ash-Blanc/clawbridge.git
cd clawbridge
uv sync --extra dev --extra all

Quick Start

clawbridge scaffold ./my-workspace
cd my-workspace
from clawbridge import build_agno_agent, load_agent_config

agent = load_agent_config("./agent.yaml")
native_agent = build_agno_agent(agent)
native_agent.print_response("What can you do?")

Build An Agent

from clawbridge import ClawAgent, ModelConfig, build_agno_agent

agent = ClawAgent(
    name="Molty",
    description="A helpful assistant",
    personality="Helpful, clear, and concise.",
    model=ModelConfig(provider="anthropic", model="claude-sonnet-4-20250514"),
)

native_agent = build_agno_agent(agent)
native_agent.print_response("Say hello and tell me what you can do.")

Agno reads ANTHROPIC_API_KEY from the environment automatically.

Hermes-Like Features

Build agents with persistent memory, self-improvement, and cross-session recall — the patterns that make Hermes-agent compelling, powered by Agno's native runtime.

Persistent Memory

from clawbridge import (
    ClawAgent, AgentMemoryMode, ModelConfig, StorageConfig, build_agno_agent,
)

agent = ClawAgent(
    name="Molty",
    description="A personal assistant that remembers you",
    model=ModelConfig(provider="openai", model="gpt-4o"),
    storage=StorageConfig(enabled=True, type="sqlite", db_url="agent.db"),
    agent_memory_mode=AgentMemoryMode.AUTOMATIC,
)

native_agent = build_agno_agent(agent)
native_agent.print_response("My name is Alice and I prefer email over Slack.")
native_agent.print_response("What's the best way to reach me?")

Self-Improvement (Learning)

from clawbridge import ClawAgent, LearningConfig, SessionConfig, StorageConfig, build_agno_agent

agent = ClawAgent(
    name="Molty",
    learning=LearningConfig(enabled=True),
    session=SessionConfig(search_past_sessions=True),
    storage=StorageConfig(enabled=True, type="sqlite", db_url="agent.db"),
)

Cross-Session Recall

agent = ClawAgent(
    name="Molty",
    session=SessionConfig(
        search_past_sessions=True,
        num_past_sessions_to_search=5,
        enable_session_summaries=True,
    ),
)

For full details, see the Hermes Features guide.

Multi-Agent Teams

Coordinate specialized agents with build_agno_team():

from clawbridge import ClawAgent, TeamConfig, TeamMode, ModelConfig, build_agno_team

team = TeamConfig(
    name="Research Team",
    mode=TeamMode.COORDINATE,
    members=[
        ClawAgent(name="Researcher", role="Find information", model=ModelConfig(provider="openai", model="gpt-4o")),
        ClawAgent(name="Writer", role="Summarize findings", model=ModelConfig(provider="openai", model="gpt-4o")),
    ],
)

native_team = build_agno_team(team)
native_team.print_response("Research the latest AI agent frameworks")

Four modes: coordinate, route, broadcast, tasks. See the Teams guide for details.

Add An OpenClaw Skill

Create a skill folder:

skills/web_search/
  SKILL.md
  tools.py
def search_web(query: str) -> str:
    """Search the web."""
    return f"Results for: {query}"

Then attach it:

from pathlib import Path
from clawbridge import ClawAgent, ClawSkill, build_agno_agent

skill = ClawSkill.from_skill_md(Path("./skills/web_search"))
agent = ClawAgent(name="Molty", skills=[skill])
native_agent = build_agno_agent(agent)

Memory Helpers

ClawMemory is a lightweight helper for OpenClaw-style memory injection:

from clawbridge import ClawMemory

memory = ClawMemory()
memory.remember("user_name", "Alice", category="preference")
print(memory.recall("user_name"))

For persistent cross-session memory, use the Hermes-like features above.

CLI

clawbridge scaffold ./my-workspace
clawbridge run --name Molty --framework agno --provider anthropic
clawbridge skills --dir ./skills
clawbridge serve --port 8000

Development

uv run ruff check src tests
uv run pytest

About

Deploy OpenClaw-style agents to any AI agent framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages