Skip to content

API Reference

Auto-generated reference documentation for all public FastAIAgent SDK classes and functions.

Core

  • AgentAgent, AgentConfig, AgentResult
  • ChainChain, ChainResult, ChainState
  • LLMClientLLMClient, LLMResponse, Message

Tools

  • ToolTool, ToolResult, FunctionTool, RESTTool, MCPTool

Safety

  • GuardrailGuardrail, GuardrailResult, no_pii, json_valid, toxicity_check
  • Guardrail primitivesrun_guardrail(guardrail, data) (compute only, applies on_error), plane_guardrails_for_agent(agent_id), guardrail_from_policy_rule(rule). Use these when the runtime isn't fa.Agent.

Durability (v1.0)

  • interrupt / Resumeinterrupt(reason, context), Resume(approved, metadata), InterruptSignal, AlreadyResumed
  • @idempotentidempotent, IdempotencyError
  • Checkpointer ProtocolCheckpointer, SQLiteCheckpointer, PostgresCheckpointer, PendingInterrupt, Checkpoint
  • Resume entrypointsChain.aresume(execution_id, *, resume_value=Resume(...)), Agent.aresume(...), Swarm.aresume(...), Supervisor.aresume(...). All four runner types share the same atomic-claim contract.

See the full durability API reference for exact method signatures, the Checkpointer Protocol surface, and the agent_path hierarchy used by multi-agent topologies.

Observability

  • TraceStoreTraceStore, TraceData, SpanData, trace_context
  • ReplayReplay, ReplayStep, ReplayResult
  • OpenInference emittersemit_guardrail(tracer, ...) / emit_evaluation(tracer, ...) open+stamp+close a child span on your tracer; set_guardrail_attributes(span, ...) / set_evaluation_attributes(span, ...) stamp a span you already own. evaluation.score is a 0..1 scale.

Intelligence

  • PromptRegistryPromptRegistry, Prompt, Fragment
  • LocalKBLocalKB, Document, SearchResult
  • PlatformKBPlatformKB (hosted; thin client over /public/v1/knowledge-bases/{id}/search)

Evaluation

  • evaluateevaluate, Dataset, Scorer, EvalResults

Platform

  • Connectionfa.connect(), fa.disconnect(), fa.is_connected. connect(export_traces=False) connects for policy/scorers/prompts without registering a span exporter or claiming OTel's global provider — for runtimes that already own one.

For detailed usage, see the individual module documentation pages linked above.