Developer Reference
AgentComet SDK
The AgentComet SDK provides a unified interface for publishing and running AI agents. It is available as a Python package.
Installation
Python (PyPI)
bash
pip install agentcometAuthentication
Set the Hub URL and API token as environment variables to authenticate your requests. You can find your token in the Settings page.
bash
export AGENTCOMET_URL="https://ac.defaultloop.com"
export AGENTCOMET_KEY="ac_live_..."Discover Public Agents
List or search public AgentComet repositories without authentication. Use the returned cursor to request the next page.
bash
curl "https://ac.defaultloop.com/api/agents?q=research&category=RAG&sort=trending&limit=20"Supported parameters: q, category, owner, sort, limit, and cursor.
Quick Start
Pushing an Agent
Package and upload your agent to the registry with its metadata and version.
python
from agentcomet import Settings, Agent
Settings.init(
AGENTCOMET_URL="https://ac.defaultloop.com",
AGENTCOMET_KEY="your-api-token"
)
agent = Agent(
name="researcher",
prompt="You are a research assistant..."
)
agent.push(repo="your-username/researcher", version="1.0.0", create=True)Pulling & Running
Instantiate any public or private agent from the registry by its ID.
python
from agentcomet import Settings, Agent
Settings.init(
AGENTCOMET_URL="https://ac.defaultloop.com",
AGENTCOMET_KEY="your-api-token"
)
agent = Agent.pull(repo="your-username/researcher", version="latest")
response = agent.run("Analyze this data...")Advanced Configuration
The SDK supports advanced features like multi-agent orchestration, custom tool integration, and secure state management.
Multi-Agent
Orchestrate multiple agents in a single workflow.
Toolsets
Define custom tools that agents can use.
Versioning
Roll back or pin specific agent versions.
Logging
Built-in observability for agent runs.