⚙️API Reference

Agent

The core class for creating AI agents.

pythonCopyAgent(
    model: str,
    system_prompt: str = None,
    deps_type: Type = None,
    result_type: Type = None,
    **kwargs
)

RunContext

Context object for tool execution.

pythonCopyRunContext[T](
    deps: T,
    **kwargs
)

Tool Decorator

Decorator for defining agent tools.

[email protected]
async def tool_name(
    ctx: RunContext[DepsType],
    *args,
    **kwargs
) -> ResultType:
    ...

Last updated