Installation¶
Requirements¶
- Python 3.10 or higher
- pip (or your preferred package manager)
Install¶
The core install is deliberately small and permissively licensed throughout —
no copyleft anywhere in the resolved tree. A clean-core CI job installs the
package with no extras on every pull request and fails the build if an AGPL or
GPL package appears, or if the library-usage surface (run_guardrail,
plane_guardrails_for_agent, guardrail evaluation) stops working without extras.
Dropping the SDK into an existing LangGraph, CrewAI or Pydantic AI project should
not drag a licence review along with it.
Optional Integrations¶
FastAIAgent uses optional dependencies to keep the core package lightweight.
| Extra | What It Adds | Install Command |
|---|---|---|
openai |
OpenAI SDK auto-tracing | pip install "fastaiagent[openai]" |
anthropic |
Anthropic SDK auto-tracing | pip install "fastaiagent[anthropic]" |
pdf |
Local PDF decoding — text, page count, page rendering (pypdfium2) | pip install "fastaiagent[pdf]" |
kb |
Local knowledge base (FastEmbed + faiss + pdf) |
pip install "fastaiagent[kb]" |
otel-export |
OpenTelemetry OTLP exporter | pip install "fastaiagent[otel-export]" |
postgres |
Postgres durability backend (psycopg3) | pip install "fastaiagent[postgres]" |
all |
All of the above | pip install "fastaiagent[all]" |
A LangGraph, CrewAI or Pydantic AI agent needs no extra: install the framework
and its OpenInference instrumentor next to fastaiagent. The [langchain],
[crewai] and [pydanticai] extras were removed in 1.96.0. See
Use fastaiagent with your existing framework.
Local PDF decoding is optional — three ways to avoid it
PDF.extract_text(), PDF.page_count(), PDF.to_page_images(),
LocalKB.add("file.pdf") and Local UI PDF thumbnails decode locally, which
the core install does not ship an engine for. You have three options:
- Do nothing.
pdf_mode="auto"(the default) selectsnativefor Claude 3.5/3.7/4.x, GPT-4o/4.1/5/o-series, Azure, Bedrock Claude and Gemini — the raw PDF goes to the provider and nothing is parsed locally. - Bring your own parser —
PDF.from_file(p, text=my_parser.extract(p)). No engine involved. - Install the extra —
pip install "fastaiagent[pdf]".
See PDFs.
Development Setup¶
git clone https://github.com/fastaifoundry/fastaiagent-sdk.git
cd fastaiagent-sdk
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev,all]"
Verify Installation¶
Environment Variables¶
| Variable | Purpose | Required |
|---|---|---|
OPENAI_API_KEY |
OpenAI API calls | If using OpenAI provider |
ANTHROPIC_API_KEY |
Anthropic API calls | If using Anthropic provider |
FASTAIAGENT_API_KEY |
Platform API key. Read by the CLI only; Python connect() never reads it, so pass api_key=os.environ["FASTAIAGENT_API_KEY"] |
Optional |
FASTAIAGENT_PROJECT |
Platform project name. Read by the CLI only; Python connect() takes project= |
Optional |
Next Steps¶
- Build Your First Agent
- Use fastaiagent with a coding assistant —
fastaiagent skills installteaches Claude Code, Copilot, Cursor and Antigravity this SDK's real API - Explore the Documentation