Skip to main content

proxagent

Supabase-backed config, logging, and memory for Claude Agent SDK agents.

One Supabase project = one company. One company can have many agents. All tables are scoped by agent, identified by a human-readable slug (e.g. otmc-agent, claims-agent).

Install

uv pip install -e .

Setup

1. Get a Personal Access Token

Go to Supabase Dashboard > Account (top right) > Access Tokens and create a PAT.

2. Check and create tables

uv run proxagent check

The CLI will:

  • Ask for your PAT
  • List your Supabase projects (arrow-key select)
  • Check if all _proxagent_* tables exist
  • Offer to create them if missing

Tables are prefixed with _proxagent_ to avoid collisions. RLS is enabled by default.

3. Register an agent

Insert a row into _proxagent_agents:

insert into _proxagent_agents (slug, name)
values ('my-agent', 'My Agent');

4. Add skills

Insert rows into _proxagent_skills:

insert into _proxagent_skills (agent_id, name, description, content)
values (
  (select id from _proxagent_agents where slug = 'my-agent'),
  'greeting_style',
  'How to greet users',
  '# Greeting Style\n\nAlways greet users warmly...'
);

Python API

ProxAgent

Single object for config, skills, and logging.

from proxagent import ProxAgent

agent = ProxAgent("my-agent", supabase_url="...", supabase_key="...")
agent.fetch()

Build system prompt (fills placeholders like {issue_key}):

prompt = agent.build_prompt(issue_key="COPS-123")

Write skills to disk (creates .claude/skills/{name}/SKILL.md with YAML frontmatter):

agent.write_skills(".")  # writes to ./.claude/skills/*/SKILL.md

Get skills as data (for writing into E2B sandboxes or other targets):

for skill in agent.skills_files():
    # skill["path"]    -> "greeting_style/SKILL.md"
    # skill["content"] -> "---\nname: greeting_style\n..."
    sandbox.files.write(f"/app/.claude/skills/{skill['path']}", skill['content'])

Write memories to CLAUDE.md (each memory becomes a bullet point):

agent.write_claude_md(".")  # writes to ./CLAUDE.md

Get CLAUDE.md content as string (for writing into E2B sandboxes):

content = agent.claude_md_content()
sandbox.files.write("/app/CLAUDE.md", content)

Save a new memory (persists to _proxagent_memories):

agent.save_memory(
    learning="For noissue.co WRO tickets, use orderops@noissue.co",
    context="Taught by Nipun on COPS-198277"
)

Memory MCP Server

Create an MCP server with a save_learning tool that the agent can call at runtime to persist new learnings:

from proxagent import ProxAgent, create_memory_server

agent = ProxAgent("my-agent", ...).fetch()
memory_server = create_memory_server(agent)

options = ClaudeAgentOptions(
    mcp_servers={"memory": memory_server},
    allowed_tools=["mcp__memory__save_learning"],
)

The agent sees a save_learning tool that accepts learning (str) and context (str). Writes to _proxagent_memories under the hood.

Log SDK messages to _proxagent_runs and _proxagent_logs:

agent.start_run(run_label="COPS-123", sandbox_id="sbx_abc")

async for message in client.receive_response():
    agent.log(message)

The logger handles all message types automatically:

  • SystemMessage (init) → creates a run in _proxagent_runs
  • AssistantMessage → logs each block (text, thinking, tool use, tool result)
  • UserMessage → logs user input and tool results
  • ResultMessage → finalizes the run with cost, duration, tokens

Environment variables

Variable Description
SUPABASE_URL Supabase project URL (e.g. https://abc123.supabase.co)
SUPABASE_SERVICE_ROLE_KEY Service role key or new-style secret key (sb_secret_...)
SUPABASE_ACCESS_TOKEN Personal Access Token (for CLI only)

ProxAgent reads from SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY by default, or accepts them as constructor args.

Tables

All tables use the _proxagent_ prefix and have RLS enabled.

Table Purpose
_proxagent_agents Agent registry — slug, name, system_prompt
_proxagent_skills Skills per agent — name, description, content, is_active
_proxagent_memories Learnings per agent — learning, context, is_active
_proxagent_runs One row per agent execution — cost, duration, tokens, result
_proxagent_logs Message-level detail — tool calls, text, thinking blocks

CLI

proxagent check    # Check/create tables in your Supabase project

Metadata

Release files for proxagent 0.1.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 proxagent 0.1.0
File Size Uploaded Provenance Actions
proxagent-0.1.0.tar.gz 83.2 kB Without provenance Details for proxagent-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for proxagent 0.1.0
File Interpreter ABI Platform Actions
proxagent-0.1.0-py3-none-any.whl Python 3 none any Details for proxagent-0.1.0-py3-none-any.whl

Total release size: 94.0 kB

Release files / proxagent-0.1.0.tar.gz

Download URL proxagent-0.1.0.tar.gz
Size 83.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a29f09b6a35bd487f783e6d50a7a7fcc9c55850a64288dd35ba058c03612c96b
BLAKE2b-256 checksum
How to use checksums
6023a74306aaa5452d7a33987c23d707c65cb514b843c3338dc95f563f2db62a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","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":null}

Release files / proxagent-0.1.0-py3-none-any.whl

Download URL proxagent-0.1.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
493357d1dc4b6827be8ae4135aabba7f162e756d50329102bbfbe0af2ff3a1f1
BLAKE2b-256 checksum
How to use checksums
b0c394db8591a4c6d9deef480d0ea584c963ddfcaadcd6f5bcefcfca482caec0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","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":null}

Security for proxagent 0.1.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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