Active development continues in pyfly.agentic, the native,
opt-in Agentic module in pyfly v26.10.08 (package version 26.10.8).
Use Agent, AgentTool, @agent and
@agent_tool. The old namespace and public names have no aliases.
Install the released pyfly wheel with the agentic extra, then enable pyfly.agentic.enabled. Follow the migration checklist. This site and the standalone releases are retained as historical material.
The guides, examples and API names below describe the former standalone distribution. Use the native pyfly documentation for current development.
Pydantic AI gives you type-safe, model-agnostic agents. A production system needs more: orchestration, validation-and-retry, memory across turns, traces and budgets, experiments. Firefly Agentic supplies every one of those as a dedicated, swappable layer — so your business logic never couples to infrastructure.
Composable modules, explicit contracts. Adopt the capabilities your application needs.
Typed controls, capability validation, explicit Chat Completions and Responses routing.
FireflyAgent, lifecycle hooks, configurable middleware and delegation strategies.
Protocol or base-class tools, guards, composition, and human-in-the-loop approval.
ReAct, CoT, Plan-and-Execute, Reflexion, Tree of Thoughts, Goal Decomposition.
Conversation history with export/import, plus working memory backed by pluggable stores.
Parse-then-validate retries, LLM-as-judge rubrics, hallucination guards.
Typed DAGs with parallel execution, retries, checkpointing and audit logs.
A code-defined orchestration DSL over agents with budgets and journal-based replay.
Eight embedding providers, six vector stores, auto-embedding and tenant scoping.
Native OpenTelemetry spans & metrics, cost resolution, and budget gates.
Prompt-injection guards, PII/secret redaction, and at-rest encryption.
Decision records, audit trails and human-readable reports for compliance.
A circuit breaker that short-circuits a failing model before it drains budget.
Firefly agents, tools, memory and model options form the application boundary. Add reasoning, validation, experiments and orchestration as needed.
Extend components through structural protocols or abstract base classes. Runtime-checkable protocols support instance checks; register or attach your implementation explicitly.
Existing openai: and azure: selectors retain Chat Completions. Choose openai-responses: or azure-responses: explicitly for Responses. Firefly validates typed options against the selected model.
Async-first, typed, and decorator-friendly. Set your provider key and FIREFLY_AGENTIC_DEFAULT_MODEL, then run these cells in a notebook. Select openai-responses:gpt-6-luna for reasoning with tools.
from fireflyframework_agentic.agents import FireflyAgent from fireflyframework_agentic.models import ModelOptions from fireflyframework_agentic.tools.builtins import CalculatorTool agent = FireflyAgent( name="assistant", tools=[CalculatorTool()], model_options=ModelOptions(max_tokens=4096), ) result = await agent.run("Calculate 15 percent of 240.") print(result.output)
from fireflyframework_agentic.agents import FireflyAgent from fireflyframework_agentic.memory import MemoryManager memory = MemoryManager(max_conversation_tokens=32_000) agent = FireflyAgent(name="bot", memory=memory) cid = memory.new_conversation() await agent.run("My name is Alice.", conversation_id=cid) result = await agent.run("What's my name?", conversation_id=cid) print(result.output)
from fireflyframework_agentic.agents import FireflyAgent from fireflyframework_agentic.reasoning import ReActPattern agent = FireflyAgent(name="reasoner") react = ReActPattern(max_steps=5) result = await react.execute(agent, "Explain bounded retries and backoff.") print(result.output)
from fireflyframework_agentic.agents import FireflyAgent from fireflyframework_agentic.pipeline import PipelineBuilder, AgentStep summarizer = FireflyAgent(name="summarizer", instructions="Summarize in one sentence.") editor = FireflyAgent(name="editor", instructions="Rewrite the summary clearly.") pipeline = ( PipelineBuilder("summarize-and-edit") .add_node("summarize", AgentStep(summarizer)) .add_node("edit", AgentStep(editor)) .chain("summarize", "edit").build() ) result = await pipeline.run(inputs="Retries stop after three attempts.") print(result.final_output)
Choose a strategy for your task. Patterns produce structured results and traces; branching and decomposition use their own execution paths.
A typed pipeline graph for structure; a Python DSL with journal-based replay. Use either, or both.
Eight embedding providers and six vector-store backends behind separate embedding and vector-store contracts — drop straight into a pipeline with EmbeddingStep and RetrievalStep.
18 hands-on chapters that teach every concept from zero to expert through a real document-processing pipeline.
Start the tutorial → Use caseA focused walkthrough of a seven-phase pipeline: ingest, split, classify, extract, validate, assemble, explain.
Read the walkthrough → ReferenceDetailed guides for every module — agents, tools, reasoning, pipelines, observability and more.
Browse the docs →