Agents
Install the Pictograph plugin in Claude Code, or give Codex an AGENTS.md, and your coding agent drives the CLI. Or build your own agent on the tool registry.
On this page
Your coding agent drives the pictograph CLI. Build your own agent on the tool registry only
if you need one.
Claude Code
pip install 'pictograph[cli]'
/plugin install pictograph --marketplace pictograph-io/pictograph-sdk
Paste your API key when asked (Settings → API Keys);
Claude Code keeps it in your system’s credential store. Leave it empty to use pictograph login
instead.
The plugin teaches Claude Code the CLI and the draft → review → export → train → deploy loop. It
runs pictograph commands and reads files without asking; anything else asks first.
On Claude Code older than 2.1.275, add the marketplace first:
/plugin marketplace add pictograph-io/pictograph-sdk
/plugin install pictograph@pictograph
Without the plugin, pictograph agents install-skill copies the same skill into
~/.claude/skills/; --target claude-ai makes a zip to upload at claude.ai.
Codex and other coding agents
pip install 'pictograph[cli]'
pictograph login
pictograph init # writes ./AGENTS.md, which Codex reads
Then ask for what you want:
Upload ./shelf to a dataset called "shelf" and draft labels for every cereal box
with SAM3. Show me the drafts it was least sure of. Once I have reviewed them,
export the dataset, train an RF-DETR detector on it, and deploy it on a T4.
The agent prices each paid step before it runs, and waits for your review of SAM3’s drafts before it exports and trains.
Call your model as a tool
# On the agent's machine (needs pictograph[inference])
pictograph models predict cereal-detector ./aisle-07.jpg --json
# Against a deployed endpoint
pictograph deployments predict cereal-detector ./aisle-07.jpg --token pk_deploy_...
# A saved workflow (model, tracking and counting) over a video
pictograph workflows run shelf-counter --file ./aisle-07.mp4
The agent finds what it can call:
pictograph tools list
pictograph tools describe "model/cereal-detector" --json
Each card gives the tool’s inputs, command and price (Vision tools).
Your own agent
The SDK’s toolkit serves 38 tools from one registry to every framework below.
from pictograph.agents import create_toolkit
toolkit = create_toolkit() # reads PICTOGRAPH_API_KEY
result = toolkit.dispatch(
name="list_datasets",
args={"limit": 10},
)
| Framework | Call | Extra | Guide |
|---|---|---|---|
| Anthropic Messages API | for_anthropic_messages(toolkit) |
- | Claude |
| Claude Agent SDK | for_claude_agent_sdk(toolkit) |
agents |
Claude |
| OpenAI Responses API | for_openai_responses(toolkit) |
- | OpenAI |
| OpenAI Agents SDK | for_openai_agents(toolkit) |
agents |
OpenAI |
| Anything else | tools.json (JSON Schema) |
- | Dynamic discovery |
Every tool’s schema: Agent tool registry. Tool sequences for common jobs: Agent cookbook.
Guardrails
- Role - each tool names the role it needs (
required_role); aviewerkey getsForbiddenError(403) on any write. - Cost - a paid tool carries its approximate cost (
cost_micro_usd). Checkget_credit_balanceandestimate_credit_costfirst;quote_training_runalso runs a training start’s checks. - Response size - a result over 25k tokens is cut short and marked
_truncated, so the agent asks again with narrower filters (create_toolkit(max_response_tokens=N)sets the cap).
System prompt rules
1. Before a destructive action (delete_dataset, delete_image,
cancel_training), restate exactly what will be removed and ask
for confirmation.
2. Before a paid action (auto_annotate_dataset, train_pipeline),
price it (estimate_credit_cost, or quote_training_run for
training) and show the cost and the remaining balance. Proceed
only if the balance covers it.
3. Use the pipeline tools (upload_dataset_from_directory,
auto_annotate_dataset, train_pipeline) one at a time, and check
each result before starting the next paid step.
4. Auto-annotations are drafts. Hand them to a person to review
before you export and train. Never approve your own drafts
unless the user says to.