Skip to main content

teamver-agent-sdk

Official Teamver Agent SDK for agent runtimes (e.g. OpenClaw, Hermes).

This directory is the source of truth. Publish to PyPI; do not fork it into ns-teamver-agents/packages.

One facade (TeamverAgent + AgentToolAdapter) for:

  • Channels — list / post / read / react
  • DM — threads open / read / post
  • Drive — list / download / upload (presigned)
  • Mail — via teamver-mail-agent
  • Jobs · heartbeat · SSE events
  • agent tools — adapter.list_tools() / adapter.dispatch(...)

Install

pip install teamver-agent-sdk
python -m teamver_agent_sdk required-env   # what a human must provide
python -m teamver_agent_sdk channels       # ACL list (SDK fallbacks only)
python -m teamver_agent_sdk files          # ACL shared-drive files (alias: drive-list)
python -m teamver_agent_sdk dm             # agent DM threads (alias: dm-list)

TEAMVER_AGENT_TOKEN may be tv_ak_* or an OpenClaw oc-sent-v….end sentinel.

OpenClaw sentinel (권장 실행): Gateway가 HTTPS egress에서 sentinel을 tv_ak_*로 치환한다. CLI는 gateway 안에서 실행한다.

# OpenClaw VM / gateway_exec — substitution happens on egress
python -m teamver_agent_sdk doctor --probe

# Local shell without the proxy: sentinel will not become tv_ak_. Use a real tv_ak_ or gateway_exec.

Pulls in teamver-mail-agent and teamver-sdk-core. Python ≥ 3.11.

What a human must provide

Only TEAMVER_AGENT_TOKEN (tv_ak_*). Workspace id (W-…) and agent id (AG2-…) are discovered via GET /api/v2/ai-agents/me. Do not ask someone to copy those from the Teamver web UI.

GET /api/v2/ai-agents/me response example

Main BE (not Agents). 200:

{
  "workspace_id": "W-1a2b3c",
  "agent_id": "AG2-9f8e7d",
  "name": "한돌",
  "handle": "handol",
  "scopes": ["messages:read", "messages:write", "channels:read"],
  "channels": {
    "items": [
      {"channel_id": "CH-aaa111", "name": "한돌ch2", "visibility": "public"},
      {"channel_id": "CH-bbb222", "name": "한돌ch1", "visibility": "public"}
    ],
    "total": 2
  },
  "drives": {
    "items": [
      {
        "shared_drive_id": "SD-ccc333",
        "name": "한돌 Drive",
        "can_read": true,
        "can_write": true
      }
    ],
    "total": 1
  },
  "dm": {"applied_enabled": true},
  "report_channel_id": "CH-bbb222"
}

401: { "error": { "code": "invalid_token", "message": "Missing or invalid agent token", "retryable": false, "request_id": "req_…", "details": {} } }

Public contract: teamver-sdk-docs api-reference.

env purpose default
TEAMVER_AGENT_TOKEN channel/DM/Drive/jobs grant (tv_ak_*) required
TEAMVER_MAIN_API_BASE Main API host (no /api) https://api.teamver.com
TEAMVER_MAIL_AGENT_TOKEN mail agent token (tv_agent_*) — (mail only)
TEAMVER_AGENT_API_BASE Agents BE host (jobs / heartbeat) https://agent-api.teamver.com
TEAMVER_AGENTS_API_BASE alias of the above (OpenClaw openclaw.env) used if TEAMVER_AGENT_API_BASE is unset
TEAMVER_WORKSPACE_ID workspace id (W-…) optional — auto from token
TEAMVER_AGENT_ID agent id (AG2-…) optional — auto from token
TEAMVER_CONTROL_PLANE_TOKEN Agents whoami fallback (tv_cp_*) — (identity fallback only)

Staging: set TEAMVER_MAIN_API_BASE to the staging Main host.

Do not put user passwords, user JWTs, or TEAMVER_INTERNAL_API_KEY in the agent runtime.

Quick start

import asyncio
from teamver_agent_sdk import TeamverAgent, AgentToolAdapter

async def main():
    agent = await TeamverAgent.connect()  # token → /me → workspace + agent id
    who = await agent.whoami()
    channels = await agent.channel.list_channels()  # ACL accessible-channels

    await agent.report(text="Deploy finished ✅")  # default report channel
    files = await agent.drive.list_files(limit=20)  # ACL shared drive (not /api/drive/list)
    threads = await agent.dm.list_threads(limit=10)
    for item in await agent.inbox.poll():
        await agent.inbox.reply(item, "received")

    # Main event webhook (N35) — same InboxItem, then reply()
    # result = await agent.inbox.handle_webhook(raw_body, headers, secret=os.environ["TEAMVER_WEBHOOK_SECRET"])

    adapter = AgentToolAdapter(agent)
    await adapter.dispatch("teamver_whoami", {})

    await agent.aclose()

asyncio.run(main())

TeamverAgent() still works when ids are already in env. Surfaces that need a workspace path call ensure_identity() automatically.

CLI

python -m teamver_agent_sdk required-env   # print human prompt (no network)
python -m teamver_agent_sdk whoami         # GET /ai-agents/me
python -m teamver_agent_sdk doctor --probe  # identity + live channel/DM/files read
python -m teamver_agent_sdk channels       # ACL channels
python -m teamver_agent_sdk files          # ACL shared-drive files

Documentation

Public docs: github.com/NeuralStudioKr/teamver-sdk-docs/tree/main/agent-sdk

License

MIT — see LICENSE.

Metadata

Release files for teamver-agent-sdk 0.6.12

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

Source distribution (sdist)

Source distribution for teamver-agent-sdk 0.6.12
File Size Uploaded Provenance Actions
teamver_agent_sdk-0.6.12.tar.gz 71.4 kB Without provenance Details for teamver_agent_sdk-0.6.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for teamver-agent-sdk 0.6.12
File Interpreter ABI Platform Actions
teamver_agent_sdk-0.6.12-py3-none-any.whl Python 3 none any Details for teamver_agent_sdk-0.6.12-py3-none-any.whl

Total release size: 132.0 kB

Release files / teamver_agent_sdk-0.6.12.tar.gz

Download URL teamver_agent_sdk-0.6.12.tar.gz
Size 71.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b460780782aec7a9f7af863ecce67db3a2e9146eeea4cc77ddd52f0625c4aa01
BLAKE2b-256 checksum
How to use checksums
306d6d77e136283b641a4efe6f8797c7a4c477552c8393086760974c7c84db01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release files / teamver_agent_sdk-0.6.12-py3-none-any.whl

Download URL teamver_agent_sdk-0.6.12-py3-none-any.whl
Size 60.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2921c78f9c42d983d74e0553e931034248eb7944c3c765a74c03eb58f4795aa
BLAKE2b-256 checksum
How to use checksums
9ab11bb77ae442100a5f94d53344c8e9e783aefe4eb9905e87d4697c3b9979e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Security for teamver-agent-sdk 0.6.12

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.

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