Python Guide

Python is the Forge surface for orchestration, data workflows, ML-adjacent systems, automation, and analyst tooling. Read this tab when the agent lives near notebooks, pipelines, warehouses, embeddings, or evaluation code.

Language perspective

Python users should focus on fast iteration without losing runtime structure. Forge gives Python workflows identity, capability control, provider boundaries, and telemetry so scripts can grow into accountable agents.

Primary surfaces:

  • forge-py/src/forge/core
  • forge-py/src/forge/agent
  • forge-py/src/forge/identity
  • forge-py/src/forge/auth
  • forge-py/src/forge/mcp
  • data, memory, embedding, and provider helpers

Follow this path

  1. Start with Quickstart.
  2. Read Memory, Embeddings and RAG, and Media.
  3. Add Agents, Tools, and Capabilities.
  4. Read Provider Capability Matrix before choosing models.
  5. Use Examples to map patterns into pipelines.
PYTHONPATH=src pytest
python3 tools/release_gate.py --root .

Contract focus

Contract Python reading lens
Memory Keep storage and retrieval tied to identity and telemetry.
Embeddings Treat vector operations as provider-backed runtime work, not side-channel state.
Tools Scope data access tools explicitly with Arsenal ACTs.
Providers Keep model choice configurable and observable.
Telemetry Make pipeline and model steps replayable through spans and audit entries.

Memory

Runtime memory patterns with identity and capability context.

Embeddings and RAG

Retrieval workflows without bypassing Forge accountability.

Media

Multimodal workflows through the same agent contract.

Examples

Copyable patterns for orchestration and data-heavy agents.

Current guidance

Use Python for data and orchestration, but keep public claims tied to the same release gate as every other SDK.