Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d6b5503
docs: update cookbooks section with multi-agent examples and source c…
SimoneBottoni Jul 9, 2026
d38d202
docs: update cookbook examples and improve environment configuration …
SimoneBottoni Jul 9, 2026
4a29586
docs: clarify LLM provider environment variable setup in README files
SimoneBottoni Jul 9, 2026
6c7f8c9
docs: add mock data tables section to CrewAI multi-agent README
SimoneBottoni Jul 9, 2026
f5cc838
docs: add hyperlink to LangChain in LangChain Agent README
SimoneBottoni Jul 9, 2026
04081b2
Merge remote-tracking branch 'origin/main' into docs/update
SimoneBottoni Jul 13, 2026
3152d5f
refactor: improve documentation
SimoneBottoni Jul 14, 2026
9bf9814
docs: remove obsolete documentation files and references
SimoneBottoni Jul 14, 2026
0846cbc
docs: remove Sphinx build steps and related artifacts from CI and Mak…
SimoneBottoni Jul 14, 2026
2fddd73
docs: remove Sphinx and related dependencies from development require…
SimoneBottoni Jul 14, 2026
8f51456
docs: add end-to-end walkthrough for SourceryKit SDK
SimoneBottoni Jul 14, 2026
3799269
docs: update navigation and fix links in onboarding and walkthrough d…
SimoneBottoni Jul 14, 2026
01bcf6f
docs: update links in README and index for consistency and accuracy
SimoneBottoni Jul 14, 2026
8c83d62
docs: standardize section headers in multi-agent README files
SimoneBottoni Jul 14, 2026
c9e53bb
docs: add multi-tool-call verification example to Single-Agent section
SimoneBottoni Jul 14, 2026
1efb49c
docs: add missing titles to configuration items and format pages for …
SimoneBottoni Jul 14, 2026
6772aa8
docs: update icons for architecture, trusted-endpoints, and migration…
SimoneBottoni Jul 15, 2026
868236c
docs: update interceptor terminology
SimoneBottoni Jul 15, 2026
6502a8d
docs: update terminology from "intercept" to "interceptor" for consis…
SimoneBottoni Jul 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ jobs:
- name: Pytest (e2e)
run: uv run pytest tests/e2e -q

- name: Sphinx
run: uv run sphinx-build -W -b html docs docs/_build/html

- name: Upload built docs as artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: docs/_build/html

- name: Build package
run: uv build

Expand All @@ -70,14 +61,3 @@ jobs:

- name: Smoke-import SDK from runtime image
run: docker run --rm sourcerykit:runtime

# deploy-docs:
# runs-on: ubuntu-latest
# needs: lint-and-test
# steps:
# - name: Setup Pages
# uses: actions/configure-pages@v5

# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
29 changes: 29 additions & 0 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Sync Docs to Website
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'cookbooks/**'
- 'README.md'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'LICENSE.md'

jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.DOCS_SYNC_APP_ID }}
private-key: ${{ secrets.DOCS_SYNC_APP_PRIVATE_KEY }}
repositories: fe-web

- uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.app-token.outputs.token }}
repository: ProvablyAI/fe-web
event-type: sync-docs
client-payload: '{"sha": "${{ github.sha }}"}'
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cookbook's README covers its own wiring.

## The flow at a glance

```
```bash
bootstrap_system() # init: schema, handshake, HTTP interceptor — call first, once
insert_trusted_endpoint(url) # allow-list each outbound endpoint
async_intercept_context(...) # wrap the tool's HTTP call — records it
Expand Down
16 changes: 4 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ UV ?= uv
PYTEST_ARGS ?= --cov=sourcerykit --cov-report=term-missing --cov-fail-under=60
RUFF_ARGS ?=
MYPY_TARGETS ?= src tests
DOCS_DIR ?= docs
DOCS_BUILD ?= $(DOCS_DIR)/_build

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -116,26 +114,20 @@ bump-pr: ## Bump version, commit, push branch (usage: make bump-pr TYPE=beta)
git push -u origin HEAD

tag: ## Create and push a version tag from current HEAD
VERSION=$$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml) && \
CHANGELOG=$$(awk "/^## $$VERSION/{found=1;next} /^## /{if(found)exit} found{print}" CHANGELOG.md | sed '/./,$!d') && \
@VERSION=$$(sed -n '/^\[project\]/,/^\[/p' pyproject.toml | sed -n 's/^version = "\(.*\)"/\1/p') && \
CHANGELOG=$$(awk "/^## \[?$$VERSION\]?/{found=1;next} /^## /{if(found)exit} found{print}" CHANGELOG.md | sed '/./,$$!d') && \
git tag -a v$$VERSION -m "$$CHANGELOG" && \
git push origin v$$VERSION

# --- docs -------------------------------------------------------------------

.PHONY: docs
docs: ## Build Sphinx HTML under docs/_build
$(UV) run sphinx-build -W -b html $(DOCS_DIR) $(DOCS_BUILD)

# --- meta workflows ---------------------------------------------------------

.PHONY: check
check: pre-commit test docs build ## Run the full CI-equivalent gate
check: pre-commit test build ## Run the full CI-equivalent gate

.PHONY: clean
clean: ## Remove build artifacts and cache directories
rm -rf build/ dist/ *.egg-info src/*.egg-info \
$(DOCS_BUILD) \
docs/_build \
.pytest_cache .ruff_cache .mypy_cache \
.coverage .coverage.* htmlcov coverage.xml
find . -type d -name __pycache__ -prune -exec rm -rf {} +
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export SOURCERYKIT_ORG_ID="..."
export SOURCERYKIT_POSTGRES_URL="postgresql://user:password@host:5432/db"
```

For a full list of CLI commands, check out the [CLI Documentation](https://github.com/ProvablyAI/sourcerykit/blob/main/docs/cli.md) file, or simply run:
For a full list of CLI commands, check out the [CLI Documentation](https://provably.ai/docs/getting_started/cli) file, or simply run:
```bash
sourcerykit --help
```
Expand Down Expand Up @@ -154,14 +154,14 @@ async def run_verifiable_agent():
Want to dig into the details? Check out our documentation and specific guides:

* **Official Documentation:** Visit [provably.ai/docs](https://provably.ai/docs) for the complete reference.
* [End-to-End Walkthrough](https://github.com/ProvablyAI/sourcerykit/blob/main/docs/example.md) — Get up and running from scratch.
* [End-to-End Walkthrough](https://provably.ai/docs/getting_started/end-to-end-walkthrough) — Get up and running from scratch.
* [Cookbooks & Examples](https://github.com/ProvablyAI/sourcerykit/tree/main/cookbooks) — Practical recipes and code samples.

### Technical Guides
- [Architecture Overview](https://github.com/ProvablyAI/sourcerykit/blob/main/docs/architecture.md)
- [HTTP Interception](https://github.com/ProvablyAI/sourcerykit/blob/main/docs/intercept.md)
- [Managing Trusted Endpoints](https://github.com/ProvablyAI/sourcerykit/blob/main/docs/trusted-endpoints.md)
- [Handoff Contracts & Evaluation](https://github.com/ProvablyAI/sourcerykit/blob/main/docs/handoff.md)
- [Architecture Overview](https://provably.ai/docs/pillars/architecture)
- [HTTP Interception](https://provably.ai/docs/pillars/interceptor)
- [Managing Trusted Endpoints](https://provably.ai/docs/pillars/trusted-endpoints)
- [Handoff Contracts & Evaluation](https://provably.ai/docs/pillars/handoff)


## Contributing
Expand Down
21 changes: 11 additions & 10 deletions cookbooks/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# SourceryKit Cookbooks
# Cookbooks

Runnable examples demonstrating SourceryKit integration with popular agent frameworks.

## Single-Agent Examples

| Framework | Description | Domain |
|---|---|---|
| [OpenAI Agents SDK](openai_agents) | Basic agent with tool interception | Weather |
| [LangChain](langchain_agent) | LangChain agent integration | Weather |
| [Claude Agent SDK](claude_agent) | Claude agent integration | Weather |
| [OpenAI Agents SDK](https://provably.ai/docs/cookbooks/openai_agents) | Basic agent with tool interception | Weather |
| [LangChain](https://provably.ai/docs/cookbooks/langchain_agent) | LangChain agent integration | Weather |
| [Claude Agent SDK](https://provably.ai/docs/cookbooks/claude_agent) | Claude agent integration | Weather |
| [Claude Agent SDK](https://provably.ai/docs/cookbooks/claude_agent_multi_tool) | Multi-tool-call verification | Weather |

## Multi-Agent Examples

| Framework | Description | Domain | Pattern |
|---|---|---|---|
| [LangGraph](langgraph_multi_agent) | Sequential pipeline with conditional routing | Travel agency | Fetcher → Evaluator → Healer |
| [CrewAI](crewai_multi_agent) | Flow with specialist agents | Invoice auditing | Specialists → Build → Evaluate |
| [OpenAI Agents SDK](openai_agents_multi_agent) | Orchestrator-driven verification | Customer support | Orchestrator → Specialists → Verify |
| [LangGraph](https://provably.ai/docs/cookbooks/langgraph_multi_agent) | Sequential pipeline with conditional routing | Travel agency | Fetcher → Evaluator → Healer |
| [CrewAI](https://provably.ai/docs/cookbooks/crewai_multi_agent) | Flow with specialist agents | Invoice auditing | Specialists → Build → Evaluate |
| [OpenAI Agents SDK](https://provably.ai/docs/cookbooks/openai_agents_multi_agent) | Orchestrator-driven verification | Customer support | Orchestrator → Specialists → Verify |

## Choosing an Example

- **Single-agent**: Start with `openai_agents` or `langchain_agent` for basic integration
- **Multi-agent with healing**: Use `langgraph_multi_agent` for automatic error recovery
- **Multi-agent with specialists**: Use `crewai_multi_agent` or `openai_agents_multi_agent`
- **Single-agent:** Start with [openai_agents](https://provably.ai/docs/cookbooks/openai_agents) or [langchain_agent](https://provably.ai/docs/cookbooks/langchain_agent) for basic integration.
- **Multi-agent with healing:** Use [langgraph_multi_agent](https://provably.ai/docs/cookbooks/langgraph_multi_agent) for automatic error recovery.
- **Multi-agent with specialists:** Use [crewai_multi_agent](https://provably.ai/docs/cookbooks/crewai_multi_agent) or [openai_agents_multi_agent](https://provably.ai/docs/cookbooks/openai_agents_multi_agent).
5 changes: 2 additions & 3 deletions cookbooks/claude_agent_multi_tool/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Claude Agent SDK — Multi-Tool-Call Demo

# Claude Agent Multi-Tool
This example demonstrates SourceryKit's multi-tool-call verification with the [Claude Agent SDK](https://github.com/anthropics/claude-agent-sdk-python). The agent calls the **same tool** (`get_weather`) twice with different cities (London and Paris). Each call produces a unique `sourcerykit_ref` (the database row UUID). The agent's claims reference the correct ref for each city, and the SDK maps each claim to the right intercept.

## How It Works
Expand All @@ -8,7 +7,7 @@ This example demonstrates SourceryKit's multi-tool-call verification with the [C
2. **All-Method Trust Gate**: SourceryKit enforces structural target validation checks against your external network endpoints. The external weather lookup endpoint (`api.open-meteo.com`) is explicitly registered via policy seeds (`insert_trusted_endpoint`) before execution.
3. **Automated Handoff & Evaluation**: The agent groups `claimed_values` by `sourcerykit_ref` and builds one claim per intercept. Each claim's `call_ref` is set to the corresponding `sourcerykit_ref`, so `build_handoff_payload` resolves each claim to the correct intercept row — even when the same `action_name` appears multiple times.

```
```bash
Tool: get_weather(London) Tool: get_weather(Paris)
intercept_context → ref_1 intercept_context → ref_2
return {..., sourcerykit_ref: ref_1} return {..., sourcerykit_ref: ref_2}
Expand Down
37 changes: 22 additions & 15 deletions cookbooks/crewai_multi_agent/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# CrewAI Multi-Agent — Invoice Auditing with Specialist Agents
# CrewAI Multi-Agent

## Invoice Auditing with Specialist Agents
This example demonstrates multi-agent orchestration using [CrewAI](https://github.com/crewAIInc/crewAI) with SourceryKit verification. Three specialist agents each query a different ERP table, with centralized evaluation by the orchestrator.

## Flow

```
```bash
Flow[AuditState]:

@start() run_specialists()
Expand Down Expand Up @@ -32,28 +32,33 @@ Flow[AuditState]:
4. **Evaluation**: The orchestrator evaluates each payload via `evaluate_handoff`. This is the verifier side — the orchestrator never touches raw agent output, only the verifiable payloads.
5. **Conditional Routing**: If any payload fails verification, a remediation crew produces an incident report analyzing the discrepancy.

## Mock Data Tables

| Specialist | Table | Action Name | Agent ID |
|---|---|---|---|
| Amount Validator | invoices | `get_invoice_amount` | `amount_validator` |
| Vendor Checker | vendors | `get_vendor` | `vendor_checker` |
| Currency Verifier | currencies | `get_currency` | `currency_verifier` |

---

## Environment Configuration
Before running the system, run the interactive setup wizard to configure your SourceryKit project variables automatically:

```bash
sourcerykit init
```

> [!IMPORTANT]
> The wizard only configures **SOURCERYKIT_*** variables. LLM provider keys must be set separately.
> The wizard only configures **SOURCERYKIT_*** variables. It does **not** configure your LLM provider infrastructure keys. You must set your model provider's environment variables (e.g. `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`) separately.

| Variable | Required | Description |
|---|---|---|
| `MODEL_NAME` | **yes** | Targeted model engine name (e.g., `openai/gpt-4o-mini`). |

> [!Note]
> Ensure your underlying model provider's environment variables—such as `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`—are also set as required by your CrewAI provider setup.

---

## Execution

1. Install dependencies:
```bash
pip install sourcerykit crewai-tools python-dotenv httpx pydantic
Expand All @@ -63,16 +68,18 @@ sourcerykit init
pip install "crewai[anthropic]" # Anthropic
pip install "crewai[litellm]" # OpenRouter / multi-provider via LiteLLM
```
2. Export your LLM-provider keys:
2. Export your LLM-provider keys into your current shell or place them in a local `.env` file:
```bash
export MODEL_NAME="openai/gpt-4o-mini"
export OPENAI_API_KEY="sk-..."
```
3. Run:
```bash
# Standard validation (PASS)
python agent_run.py
3. Run the example:
```bash
# Standard Validation
python agent_run.py

# or

# Hallucination simulation (CAUGHT → Remediation)
python agent_run.py --tamper
# Hallucination Simulation
python agent_run.py --tamper
```
9 changes: 2 additions & 7 deletions cookbooks/langchain_agent/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LangChain Agent
This example demonstrates how to integrate SourceryKit with LangChain using agent compilation workflows (create_agent). It showcases automated tool intercept capture, target endpoint allow-list constraints, native structured JSON responses via Pydantic, and backend evaluation loops.
This example demonstrates how to integrate SourceryKit with [LangChain](https://github.com/langchain-ai/langchain) using agent compilation workflows (create_agent). It showcases automated tool intercept capture, target endpoint allow-list constraints, native structured JSON responses via Pydantic, and backend evaluation loops.

## How It Works
1. **HTTP Interception**: The `bootstrap_system()` hook dynamically monitors outbound `httpx` calls, ensuring that network operations generated within the LangChain agent tool loop (`get_current_temperature_london`) are securely logged to your database intercepts table.
Expand All @@ -16,17 +16,12 @@ sourcerykit init
```

> [!IMPORTANT]
> The wizard only configures **SOURCERYKIT_*** variables. It does **not** configure your LLM provider infrastructure keys (like `MODEL_NAME` or `OPENROUTER_API_KEY`). Those must still be set up separately in your environment.

You will also need to set these LLM-provider variables manually:
> The wizard only configures **SOURCERYKIT_*** variables. It does **not** configure your LLM provider infrastructure keys. You must set your model provider's environment variables (e.g. `OPENROUTER_API_KEY`) separately.

| Variable | Required | Description |
|---|---|---|
| `MODEL_NAME` | **yes** | Targeted model architecture identifier string passed to create_agent (e.g., `openrouter:openai/gpt-4o-mini`). |

> [!Note]
> Ensure your underlying model provider's environment variables—such as `OPENROUTER_API_KEY`—are also set as required by your LangChain backend provider setup.

---

## Execution
Expand Down
31 changes: 13 additions & 18 deletions cookbooks/langgraph_multi_agent/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# LangGraph Multi-Agent — Travel Agency Flight Status
# LangGraph Multi-Agent

## Travel Agency Flight Status
This example demonstrates a multi-agent pipeline using [LangGraph](https://github.com/langchain-ai/langgraph) with SourceryKit verification and conditional routing.

## Flow

```
```bash
START → Fetcher Agent → Build Handoff → Evaluator
┌──────────────────┤
Expand Down Expand Up @@ -41,35 +41,30 @@ sourcerykit init
```

> [!IMPORTANT]
> The wizard only configures **SOURCERYKIT_*** variables. It does **not** configure your LLM provider infrastructure keys (like `MODEL_NAME` or `OPENROUTER_API_KEY`). Those must still be set up separately in your environment.

You will also need to set these LLM-provider variables manually:
> The wizard only configures **SOURCERYKIT_*** variables. It does **not** configure your LLM provider infrastructure keys. You must set your model provider's environment variables (e.g. `OPENROUTER_API_KEY`) separately.

| Variable | Required | Description |
|---|---|---|
| `MODEL_NAME` | **yes** | Targeted model architecture identifier string passed to create_agent (e.g., `openrouter:openai/gpt-4o-mini`). |

> [!Note]
> Ensure your underlying model provider's environment variables—such as `OPENROUTER_API_KEY`—are also set as required by your LangChain backend provider setup.

---

## Execution

1. Install dependencies:
```bash
pip install sourcerykit langchain langgraph python-dotenv httpx pydantic
```
2. Export your LLM-provider keys:
2. Export your LLM-provider keys into your current shell or place them in a local `.env` file:
```bash
export MODEL_NAME="openrouter:openai/gpt-4o-mini"
export OPENROUTER_API_KEY="sk-or-..."
```
3. Run:
```bash
# Standard validation (PASS)
python agent_run.py
3. Run the example:
```bash
# Standard Validation
python agent_run.py

# or

# Hallucination simulation (CAUGHT → Healer)
python agent_run.py --tamper
# Hallucination Simulation
python agent_run.py --tamper
```
6 changes: 3 additions & 3 deletions cookbooks/openai_agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ You will also need to set these LLM-provider variables manually:

| Variable | Required | Description |
|---|---|---|
| `MODEL_URL` | **yes** | Base URL routing endpoint for the LLM processing interface (e.g., `https://openrouter.ai/api/v1`). |
| `MODEL_API_KEY` | **yes** | API authentication token for the targeting model processing engine. |
| `MODEL_NAME` | **yes** | Targeted model engine name (e.g., `openai/gpt-4o-mini`). |
| `MODEL_URL` | **yes** | Base URL for the LLM provider (e.g., `https://openrouter.ai/api/v1`). |
| `MODEL_API_KEY` | **yes** | API authentication token for the LLM provider. |
| `MODEL_NAME` | **yes** | Model name (e.g., `openai/gpt-4o-mini`). |

---

Expand Down
Loading
Loading