API Reference#
On this page, you will find the pyagentspec
API reference, ordered by component.
Click on the components and section names to acccess the complete API documentation pages.
Components#
Classes
Base class for all components that can be used in Agent Spec. |
|
Base class for all components that have input and output schemas. |
Agents#
Classes
An agent is a component that can do several rounds of conversation to solve a task. |
Remote Agents#
Classes
Represents an agent that is defined and created remotely. |
|
An agent is a component that can do several rounds of conversation to solve a task. |
Flows & Nodes#
Classes
A flow is a component to model sequences of operations to do in a precised order. |
|
Base class for all nodes that can be put inside a flow. |
|
A data flow edge specifies how the output of a node propagates as input of another node. |
|
A control flow edge specifies a possible transition from a node to another in a flow. |
|
The agent execution node is a node that will execute an agent as part of a flow. |
|
Make an API call. |
|
Select the next node to transition to based on a mapping. |
|
End nodes denote the end of the execution of a flow. |
|
The flow node executes a subflow as part of a flow. |
|
This node interrupts the execution of the flow in order to wait for a user input, and restarts after receiving it. |
|
Execute a prompt template with a given LLM. |
|
The map node executes a subflow on each element of a given input as part of a flow. |
|
This node appends an agent message to the ongoing flow conversation. |
|
Start nodes denote the start of the execution of a flow. |
|
The tool execution node is a node that will execute a tool as part of a flow. |
LLMs#
Classes
A LLM configuration defines how to connect to a LLM to do generation requests. |
|
A configuration object defining LLM generation parameters. |
|
Class to configure a connection to a vLLM-hosted LLM. |
|
Class to configure a connection to a local model ran with Ollama. |
|
Class to configure a connection to a OCI GenAI hosted model. |
|
Base abstract class for OCI client config. |
|
OCI client config class for authentication using API_KEY and a config file. |
|
OCI client config class for authentication using SECURITY_TOKEN. |
|
OCI client config class for authentication using INSTANCE_PRINCIPAL. |
|
OCI client config class for authentication using RESOURCE_PRINCIPAL. |
|
Class to configure a connection to an LLM that is compatible with OpenAI completions APIs. |
|
Class to configure a connection to a OpenAI LLM. |
Tools#
Classes
A tool specifies a function made available to an agent or a flow. |
|
A tool that needs to be run by the client application. |
|
A tool that is run remotely and called through REST. |
|
A tool that is registered to and executed by the orchestrator. |
|
Class for tools exposed by MCP servers |
IO Properties#
Classes
Properties are the values that Components expose as inputs and outputs. |
|
Property object to represent a string property. |
|
Property object to represent a boolean property. |
|
Property object to represent an integer property. |
|
Equivalent of a number property. |
|
Property object to represent a number property. |
|
Property object to represent a null property. |
|
Property object to represent a union property. |
|
Property object to represent a list property. |
|
Property object to represent a dict property. |
|
Property object to represent an object property. |
MCP#
Classes
Class to specify parameters of the MCP client session. |
|
Base transport for connecting to an MCP server via subprocess with stdio. |
|
Transport implementation that connects to an MCP server via Server-Sent Events. |
|
Transport layer for SSE with mTLS (mutual Transport Layer Security). |
|
Transport layer for streamable HTTP with mTLS (mutual Transport Layer Security). |
|
Transport implementation that connects to an MCP server via Streamable HTTP. |
|
Class for tools exposed by MCP servers |
Serialization / Deserialization#
Classes
Provides methods to serialize Agent Spec Components. |
|
Provides methods to deserialize Agent Spec Components. |
|
Interface for the serialization of Components. |
|
Base class for Component serialization plugins. |
|
|
Serialization plugin for Pydantic Components. |
Interface for the deserialization of Components. |
|
Base class for Component deserialization plugins. |
|
|
Deserialization plugin for Pydantic Components. |