diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..cdd67dce --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,61 @@ +name: docs + +# Build the MkDocs site and deploy it to GitHub Pages. +# +# One-time manual step (cannot be automated from here): +# Repo Settings → Pages → Build and deployment → Source: "GitHub Actions". +# After that, every push to main that touches the docs rebuilds and deploys to +# https://fireflyframework.github.io/fireflyframework-agentic/ + +on: + push: + branches: [main] + paths: + - "docs/**" + - "overrides/**" + - "mkdocs.yml" + - "CHANGELOG.md" + - ".github/workflows/docs.yml" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment; don't cancel an in-progress run. +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }} + restore-keys: ${{ runner.os }}-pip- + - name: Install docs toolchain + run: pip install -r docs/requirements.txt + - name: Build (strict) + run: mkdocs build --strict + - uses: actions/upload-pages-artifact@v3 + with: + path: site + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index d4966a8d..c91f4ecf 100644 --- a/.gitignore +++ b/.gitignore @@ -144,3 +144,9 @@ examples/corpus_search/test_queries.md examples/corpus_search/test_queries.local.md docs/superpowers/ PLAYGROUND.md + +# MkDocs build output +/site/ + +# Playwright MCP screenshots (local verification) +/.playwright-mcp/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c3d2a5e..eb0c5096 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,6 +34,10 @@ repos: args: [--markdown-linebreak-ext=md] - id: end-of-file-fixer - id: check-yaml + # mkdocs.yml uses Material's `!!python/name:` tags (e.g. the mermaid + # superfence), which check-yaml can't construct. `mkdocs build --strict` + # in the docs workflow is its real validator. + exclude: ^mkdocs\.yml$ - id: check-toml - id: check-json # tsconfig*.json files use JSONC (comments, trailing commas). diff --git a/CHANGELOG.md b/CHANGELOG.md index 0307b7e6..76d8cbe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -343,7 +343,7 @@ a **live Anthropic model** end to end. All nine confirmed P0/P1 findings address Framework alignment: the Dynamic Workflows engine and the tools system now run on the framework's own primitives and on pydantic-ai's native model — no parallel implementations, no lossy shims. Includes breaking changes; see the -[Migration Guide](docs/migration.md). +[Migration Guide](https://github.com/fireflyframework/fireflyframework-agentic/blob/main/docs/migration.md). ### Changed (BREAKING) diff --git a/README.md b/README.md index c0f7e592..341e81a0 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ You write your business logic; the framework provides the architecture. ## Architecture at a Glance
-
+
Open source · Apache-2.0 · Built on Pydantic AI
+
+ Firefly Agentic is the production-grade metaframework built on Pydantic AI.
+ Keep its Agent, Tool and RunContext — gain
+ lifecycle hooks, delegation, memory, reasoning patterns, validation loops, RAG
+ and DAG pipelines. Protocol-driven, swappable, no lock-in.
+
+ 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. +
+Twelve composable layers. Adopt one, or all of them.
+FireflyAgent, registry, a 10-stage middleware chain, and seven 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 and working memory with token budgets and 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 deterministic resume.
+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.
+Core → Agent → Intelligence → Experimentation → Orchestration. Higher layers depend on lower ones, never the reverse.
+Every extension point is a @runtime_checkable protocol — implement it and the framework discovers your component by duck typing.
Async-first, typed, and decorator-friendly. Here's the shape of it.
+from fireflyframework_agentic.agents import FireflyAgent + +agent = FireflyAgent(name="assistant", model="openai:gpt-4o") +result = await agent.run("Summarize this contract in 3 bullets.") +print(result.output)+
from fireflyframework_agentic.memory import MemoryManager + +memory = MemoryManager(max_conversation_tokens=32_000) +agent = FireflyAgent(name="bot", model="openai:gpt-4o", memory=memory) + +cid = memory.new_conversation() +await agent.run("My name is Alice.", conversation_id=cid) +await agent.run("What's my name?", conversation_id=cid) # -> Alice+
from fireflyframework_agentic.reasoning import ReActPattern + +react = ReActPattern(max_steps=5) +result = await react.execute(agent, "What's the weather in London?") +print(result.output) # structured ReasoningResult + trace+
from fireflyframework_agentic.pipeline.builder import PipelineBuilder +from fireflyframework_agentic.pipeline.steps import AgentStep, CallableStep + +pipeline = ( + PipelineBuilder("idp") + .add_node("classify", AgentStep(classifier)) + .add_node("extract", AgentStep(extractor)) + .add_node("validate", CallableStep(check)) + .chain("classify", "extract", "validate") + .build() +) +result = await pipeline.run(inputs="Process this document")+
Every pattern shares a reason → act → observe → continue template, produces a structured trace, and swaps its output mode per model.
+A typed pipeline graph for structure; a Python DSL for deterministic, resumable orchestration. Use either, or both.
+Eight embedding providers and six vector-store backends behind one protocol — 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 case +A focused walkthrough of a seven-phase pipeline: ingest, split, classify, extract, validate, assemble, explain.
+ Read the walkthrough → + + + Reference +Detailed guides for every module — agents, tools, reasoning, pipelines, observability and more.
+ Browse the docs → + +