Skip to main content

Forge (🔥)

A minimal-core, zero-magic, native async/streaming framework for LLM tools & agents.

Forge is built as a lightweight, transparent alternative to LangChain. Instead of deep nested wrappers, magic execution chains, and implicit retries, Forge provides a flat execution model: agent -> tool call -> result.

Forge Architecture Diagram


⚡ Key Features

  • Flat Execution Model: Explicit, readable loops. Debugging is simple because there are no hidden layers.
  • Typed Tool Schemas: Use Python function signatures + Pydantic for automated, clean JSON schema generation.
  • Native Async & Streaming: Built from the ground up on async/await for fast, non-blocking execution.
  • Built-in Local Tracing: Full visibility into exact request/response payloads without relying on external paid services.
  • Zero Bloat: Lightweight dependencies. Optional provider packages (e.g. anthropic).

🚀 Quickstart

import asyncio
from forge import Agent, tool, AnthropicProvider

@tool(description="Calculate the result of a mathematical expression")
def calculate(expression: str) -> str:
    return str(eval(expression))

async def main():
    provider = AnthropicProvider(model="claude-3-5-sonnet-20241022")
    agent = Agent(
        provider=provider,
        tools=[calculate],
        system_prompt="You are a helpful assistant.",
        verbose=True,
    )

    history = await agent.run("What is 128 * 42?")
    print("Answer:", history[-1].content)

if __name__ == "__main__":
    asyncio.run(main())

🛠️ Testing & Development

Run unit tests via pytest:

pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forge_llm_core-0.1.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forge_llm_core-0.1.1-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file forge_llm_core-0.1.1.tar.gz.

File metadata

  • Download URL: forge_llm_core-0.1.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for forge_llm_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5d0d265fdead44a706073fd3fc650e10d7cdb8202f29c1737b0e75e4aff44068
MD5 687e0d9adc6125cf5ed3de191662e751
BLAKE2b-256 bc1f102a39826f89e325d45cbabda7369358ee48b94212b7d6ef568da77c9df1

See more details on using hashes here.

Provenance

The following attestation bundles were made for forge_llm_core-0.1.1.tar.gz:

Publisher: publish.yml on yasirusman85/forge-llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file forge_llm_core-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: forge_llm_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for forge_llm_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 026c04e8b7022b84931d062f8353f94a93d256976f8eab7bc1733e0f47b27d3f
MD5 f36badd911153d8ce4056b6b7e2694f2
BLAKE2b-256 2a239ead7446e06339785724b105497b8c283bfc2c5887b4a70a570d7e81c5ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for forge_llm_core-0.1.1-py3-none-any.whl:

Publisher: publish.yml on yasirusman85/forge-llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page