PlatformClient gives agents and scripts full CRUD access to workspaces, issues, labels, and agents over the Platform API.
Quick Start
How It Works
| Pattern | When to use |
|---|---|
| Context manager | Multiple API calls — reuses connections |
| Standalone client | Single request with a known token |
API Areas
| Area | Key methods |
|---|---|
| Auth | register, login, get_me |
| Workspaces | create_workspace, list_workspaces, add_member |
| Projects | create_project, list_projects, get_project_stats |
| Issues | create_issue, list_issues, update_issue |
| Comments | add_comment, list_comments |
| Agents | create_agent, list_agents, update_agent |
| Labels | create_label, add_label_to_issue, list_issue_labels |
| Dependencies | create_dependency, list_dependencies |
Error Handling
Best Practices
Use connection pooling
Use connection pooling
Keep related calls inside one
async with PlatformClient(...) block.Handle token lifecycle
Handle token lifecycle
Call
register() or login() once; the client stores the JWT for later requests.Scope calls to a workspace
Scope calls to a workspace
Pass
workspace_id on every resource method — RBAC enforces membership.Read config from the environment
Read config from the environment
Use
os.getenv("PLATFORM_URL") and os.getenv("PLATFORM_TOKEN") in production.Related
Platform SDK Reference
REST endpoints and request schemas
Platform Client SDK Testing
Integration tests with ASGITransport

