API reference
Signatures and docstrings for the tulip package, rendered from
tulip-agents 2.16.0, the SDK version this site is built
against. Each page covers one area of the framework. For what a piece is for
and how it fits with the rest, start with the guide linked beside it, then
come back here for the exact signature.
The everyday names import from the package root. Everything else imports from
the module its page names:
from tulip import Agent, AgentConfig, StateGraph, tool
from tulip.core.termination import MaxIterations, ToolCalled
Agents and runs
| Reference |
What it documents |
Guide |
| Agent |
Agent, AgentConfig, AgentResult and AgentState: configure an agent, run it, and read back a typed result |
Agent, The agent loop |
| Termination |
Stop conditions such as MaxIterations, TimeLimit and ToolCalled, composed into one rule and set on AgentConfig.termination |
Termination |
| Hooks |
HookProvider and HookRegistry, which dispatches providers in priority order; the hook event types; and the built-in logging, telemetry, retry, guardrail and steering hooks |
Hooks |
| Events |
The typed, frozen TulipEvent models that async for event in agent.run(...) yields |
Events |
| Streaming |
Handlers that send the event stream to a terminal, a Server-Sent Events response or a buffer, and structured-output streaming |
Streaming, Graph streaming |
| Core primitives |
The shared types underneath: settings, protocols, messages, the error hierarchy, and the Command and interrupt helpers for graph control flow |
State, Errors |
| Reference |
What it documents |
Guide |
| Tools |
The @tool decorator, which builds a tool's schema from the function's type hints and docstring; ToolContext, the registry and the executors |
Tools |
| Capability providers |
Web search, web fetch, image generation and speech providers. Set one on AgentConfig and the agent registers a matching tool |
Multi-modal providers, Tools |
| Integrations |
MCP in both directions: serve a Tulip agent to any MCP client, or turn MCP tools into Tulip tools. Also use_aws, which refuses any AWS operation whose name does not start with a read verb such as Describe, List or Get |
MCP |
| Skills |
Skill and SkillsPlugin: SKILL.md instruction bundles the agent loads on demand, attached with AgentConfig.skills |
Skills |
| Playbooks |
Declared step sequences with expected tools. Set AgentConfig.playbook and a PlaybookEnforcerHook checks each tool call against the current step |
Playbooks |
Models and reasoning
| Reference |
What it documents |
Guide |
| Models |
get_model and the provider registry, where the part of a model string before the colon picks the provider; the ModelProtocol contract; and the native provider classes |
Model providers |
| Reasoning |
Reflector, which evaluates the agent's progress after each iteration; GroundingEvaluator, which checks claims against the evidence the tools gathered; CausalChain; and GSAR's thresholds and results |
Reasoning, GSAR |
Memory and retrieval
| Reference |
What it documents |
Guide |
| Memory |
Conversation managers that keep, window or summarize the history within a run; the cross-thread BaseStore; and the long-term memory manager, which decides what to keep from a finished session |
Conversation management, Long-term memory |
| Checkpointers |
BaseCheckpointer and its storage backends. Prior turns are reloaded only when the agent has a checkpointer and you pass a thread_id |
Checkpointers |
| RAG |
RAGRetriever over pluggable embedders and vector stores, rerankers, multimodal processing, and helpers that expose retrieval as a tool |
RAG |
Multi-agent
| Reference |
What it documents |
Guide |
| Multi-agent |
Pipelines (SequentialPipeline, ParallelPipeline, LoopAgent), an orchestrator with specialists, swarms, handoffs, and the StateGraph workflow |
Multi-agent workflows |
| DeepAgent |
create_deepagent, a research-shaped Agent with optional filesystem, todo and subagent tools; and create_research_workflow, a StateGraph that scores its summary's grounding and rewrites or replans, up to set limits, when the score is below threshold |
DeepAgent |
| A2A |
A2AServer and A2AClient: one agent calls another over HTTP with the Agent-to-Agent protocol. The server accepts both the v1 wire format and the earlier one |
A2A — Agent-to-Agent |
Serving, observing and testing
| Reference |
What it documents |
Guide |
| Agent server |
AgentServer, which wraps an agent as a FastAPI app with /invoke, /stream, /threads/{thread_id} and /health routes; and GraphRunnable, for serving a compiled StateGraph |
Agent Server |
| Observability |
The in-process EventBus, which fans events out to subscribers by run id; the emit() helpers; run context; and EventBusHook, which republishes an agent's hook events onto the bus |
Observability, SSE event catalogue |
| Evaluation |
EvalCase, EvalRunner and EvalReport for test suites; LLMJudge for answers with no single right string; check_trajectory for the order tools were called in; and graph evaluation targets |
Evaluation, Testing agents |
Control
| Reference |
What it documents |
Guide |
| Control |
admit(), which checks an action against a ControlPolicy you write, before the action runs: allow, hold for a person, or deny (API values allow, require_human, deny). gate_tool puts the same check in front of a tool, approval stores keep held calls until someone decides, and AuditTrail records each decision when you pass one. Only the calls you route through the gate are checked |
Control-layer architecture, Writing a policy that holds |
Security domain
| Reference |
What it documents |
Guide |
| Security |
One domain built on the framework: red-team probes and jobs, grounded findings that come back as evidence or an Abstention, verification skeptics, and MITRE ATLAS and OWASP taxonomy tags. Import the admission gate from tulip.control, not from here |
Agentic AI-security, Security layer |
Deprecated
ReAct loop documents tulip.loop, a second ReAct implementation
that Agent has never used. It is scheduled for removal in 3.0.0, and each
name you import from it emits TulipDeprecationWarning. Use
Agent instead.