Pyplan includes several built-in agent types designed to assist users across different workflows. These agents come pre-configured with specialized roles, optimized behaviors, and access capabilities tailored to their purpose. They simplify user interactions, automate complex tasks, and guide users through model logic, analysis, or interface creation.


The Pyplan Agent focuses on platform-level knowledge. It understands the structure and capabilities of Pyplan and is able to:
This agent acts as the user’s first point of contact when learning or troubleshooting Pyplan functionality.
The Analyst Agent specializes in data analysis, offering analytical insights directly within Pyplan. Its capabilities include:
It is ideal for applications that require quick, natural-language-driven analytical support.
The Process Agent guides users through the workflow of the current application, ensuring proper execution of steps. It can:
This agent is useful in operational applications where consistency and guidance are important.
The Developer Agent assists in the technical construction and maintenance of the Pyplan model. It is designed for advanced users and can:
It accelerates model development and promotes best practices.
The Visualizer Agent focuses on interface creation and layout design. It assists with:
Ideal for users who need to build dashboards but are not experts in interface design.
Code Assistants support Python-related tasks within Pyplan. They can:
They are especially useful for developers working on logic-heavy or computational models.

Custom Agents allow application developers to create their own specialized AI assistants. They can:
This flexibility enables fully tailored agents for finance, operations, demand planning, forecasting, and more.
The Agent class defines an AI agent inside Pyplan. Agents can execute instructions, access model nodes, use tools, interact with RAG (Retrieval-Augmented Generation), perform handoffs, and even be exposed as tools for other agents.
Agent Classclass Agent(BaseModel):
name: Optional[str] = None
code: Optional[str] = None
description: Optional[str] = None
handoff_description: Optional[str] = None
model: str = "gpt-4.1"
instructions: Optional[str] = None
tools: Optional[List[AgentTool]] = None
handoffs: Optional[List[Agent]] = None
agents_as_tool: Optional[List[AgentAsTool]] = None
rag_settings: Optional[RAGSettings] = None
visible: bool = True
disabled: bool = False
enable_on_sections: Optional[List[str]] = ['*']
context_node_ids: Optional[List[str]] = None
context_settings: ContextSettings = ContextSettings()
output_type: Optional[Any] = None
gpt-4.1.from pyplan_core.classes.ai.Agent import Agent
result = Agent(
model = "gpt-4.1",
instructions = "You are a color specialist. The user will provide a color name and you must return its HEX value.",
)
from pyplan_core.classes.ai.Agent import Agent
result = Agent(
model = "gpt-4.1",
instructions = "You are an expert in data analysis with Python. Answer questions very concisely.",
context_node_ids = []
)
from pyplan_core.classes.ai.Agent import Agent, RAGSettings
result = Agent(
model = "gpt-4.1",
instructions = RAGSettings.DEFAULT_INSTRUCTIONS,
rag_settings = RAGSettings(
source_path = current_path + 'rag/source',
chroma_db_path = current_path + 'rag/db',
)
)
from pyplan_core.classes.ai.Agent import Agent
result = Agent(
model = "gpt-4.1",
instructions = """
You classify the user's emotional state from the text.
Possible states: happy, neutral, angry, indeterminate.
Return an object with:
- state
- justification
"""
)
from pyplan_core.classes.ai.Agent import Agent
result = Agent(
model = "gpt-4.1",
instructions = """
ROLE: You are a data analyst agent. Analyze sales
data and temperature data, then generate an
executive summary in Spanish and email it.
INSTRUCTIONS:
- Summary: total sales, margin, top/bottom regions.
- Trends over time.
- Correlation sales vs temperature.
- Anomalies.
- Produce a 200–300 word executive summary.
- Use send_email tool to send to fbrussa@novix.com.
""",
context_node_ids = [],
tools=[]
)
The agent_tool decorator transforms a Python function into an AgentTool object that can be used inside Pyplan agents.
from pyplan_core.classes.ai.Agent import agent_tool
from typing import Annotated
from function_schema import Doc
@agent_tool
def send_email(
subject: Annotated[str, Doc('Email subject')],
address: Annotated[str, Doc('Email address')],
content: Annotated[str, Doc('HTML email body')],
):
"""Send an email according to the parameters provided"""
return pp.send_email(html_content=content, emails_to=[address], subject=subject)
Add the tool to an agent:
agent = Agent(
model="gpt-4.1",
instructions="Your role...",
tools=[send_email],
)