Docs

How does the Plugsky AI agents API work?

The Plugsky agents API runs autonomous, multi-step agents behind an OpenAI-compatible platform. You POST an input and a tool list to /v1/agents/{agent_id}/agent/runs; the agent plans steps, calls your tools, and returns structured output plus a full step trace. Memory, streaming and human-approval gates are built in.

Key facts

EndpointPOST /v1/agents/{agent_id}/agent/runs
Run stepsDefault 10, configurable via max_steps; max 50 self-serve, 200 Enterprise
ToolsNamed tools via OpenAI-format function calling
MemoryConversation, tool logs and structured memory namespaced per agent; vector memory via RAG
StreamingSet stream: true for SSE step events
Approval gatesrequires_approval on sensitive tools pauses the run for human review
Multi-agentNamed sub-agents with shared memory in Agent Cloud
Product statusLive

TL;DR

  • Agents run as API calls: send a goal plus tools, get steps, tool calls and output.
  • max_steps defaults to 10, configurable up to 50 self-serve and 200 on Enterprise.
  • Memory and tool logs are namespaced per agent; RAG adds vector memory.
  • Streaming returns each planning and tool step over SSE as it happens.
  • requires_approval pauses sensitive tool calls for a human decision.

How it works, step by step

  1. Create an agent (or use an existing agent_id) in your workspace.
  2. Define the tools the agent may call, using OpenAI-format function schemas.
  3. POST a goal to /v1/agents/{agent_id}/agent/runs with tools and max_steps.
  4. Set stream: true if you want step-by-step SSE events while the run executes.
  5. Add requires_approval to destructive or high-cost tools before production use.
  6. Inspect the returned steps array, then log the run id for audit and replay.
1Create an agent (oruse an existingagent_id) in your2Define the toolsthe agent may call,using OpenAI-format3POST a goal to/v1/agents/{agent_id}/agent/runswith tools and4Set stream: true ifyou wantstep-by-step SSE5Addrequires_approvalto destructive or6Inspect thereturned stepsarray, then log the

Try it yourself

Open the function-calling schema generator →

How an agent run works

An agent run is a single API call that may take several model turns. You send an input, the tools the agent is allowed to use and a step budget; the service plans, chooses tools, executes them and returns a final output. Every run returns a steps array that records each thought and tool call, so you can replay exactly what happened.

Runs are capped by max_steps: the default is 10, with a maximum of 50 on self-serve plans and 200 on Enterprise. When an agent needs more moves than one request should reasonably contain, break the workflow into sub-agents instead of raising the limit.

Tools, memory and guardrails

Tools use the same function-calling shape as chat completions, so existing schemas port directly. Memory is namespaced per agent: conversation history, tool-call logs and structured state stay isolated, and vector memory can be backed by the RAG API when an agent needs to retrieve from documents.

  • Set requires_approval: true on any tool that writes, sends or spends.
  • Keep tool descriptions narrow — the model chooses tools from their descriptions.
  • Prefer several small tools over one tool with a mode switch.

Streaming and observability

Set stream: true to receive SSE events as the run progresses. Each event carries the step type, content and any tool result, which lets a UI show the agent thinking in real time instead of waiting for the final answer. Because every run is also logged with model, latency and token counts, you can ship the stream to users and keep the full trace for audits.

When to use agents instead of chat completions

Use chat completions for single-shot generation, extraction and classification. Use the agents API when a task needs multiple dependent tool calls, retries or a record of intermediate reasoning. If you need the OpenAI Assistants-style stateful threads with built-in file search, note that the Assistants-compatible endpoint is listed as coming soon in the docs — the agent runs API above is the supported production path today.

Honest comparison

CapabilityPlugsky agents APIChat completions onlyDIY agent framework
Multi-step executionBuilt into a single run with step traceYou orchestrate every turnYou build the loop
Tool callsOpenAI-format tools, executed and loggedModel returns calls, you executeYou build the runtime
MemoryNamespaced per agent, optional vector memoryYou resend historyYou build storage
Human approvalrequires_approval gate per toolManualCustom
StreamingSSE step eventsSSE deltasCustom
Ops overheadManaged endpoint and logsLow but manualHigh — one more system to run

Frequently asked questions

How many steps can an agent take?

The default is 10 and it is configurable per run with max_steps. The maximum is 50 on self-serve plans and 200 on Enterprise.

Can agents call other agents?

Yes. Agent Cloud supports multi-agent orchestration with named sub-agents and shared memory, so a planner can delegate to specialists.

How is agent memory handled?

Conversation history, tool-call logs and structured memory are namespaced per agent. Vector memory backed by the RAG API is supported for document retrieval.

Can I pause an agent for human review?

Yes. Set requires_approval: true on any tool and the run pauses before that tool call until a person approves or rejects it.

Does the agents API stream?

Yes. Set stream: true and the run emits SSE events for each step, including tool inputs and outputs.

Is the agents API OpenAI-compatible?

Tool definitions use the OpenAI function-calling format and the platform accepts OpenAI SDK clients against the Plugsky base URL.

What happens if a tool fails?

The failure is recorded in the run steps and the agent can retry or choose another path within its step budget; your application decides the final policy.

Cite this page

Plugsky (2026). “Plugsky AI Agents API — Runs, Memory, Tools”. Plugsky. Available at: https://plugsky.com/docs/agents (last updated 2026-09-25).