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.
⚡ 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d0d265fdead44a706073fd3fc650e10d7cdb8202f29c1737b0e75e4aff44068
|
|
| MD5 |
687e0d9adc6125cf5ed3de191662e751
|
|
| BLAKE2b-256 |
bc1f102a39826f89e325d45cbabda7369358ee48b94212b7d6ef568da77c9df1
|
Provenance
The following attestation bundles were made for forge_llm_core-0.1.1.tar.gz:
Publisher:
publish.yml on yasirusman85/forge-llm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forge_llm_core-0.1.1.tar.gz -
Subject digest:
5d0d265fdead44a706073fd3fc650e10d7cdb8202f29c1737b0e75e4aff44068 - Sigstore transparency entry: 2413102743
- Sigstore integration time:
-
Permalink:
yasirusman85/forge-llm@33b55152961ea483f7c465e95675015c29432f2a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/yasirusman85
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33b55152961ea483f7c465e95675015c29432f2a -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
026c04e8b7022b84931d062f8353f94a93d256976f8eab7bc1733e0f47b27d3f
|
|
| MD5 |
f36badd911153d8ce4056b6b7e2694f2
|
|
| BLAKE2b-256 |
2a239ead7446e06339785724b105497b8c283bfc2c5887b4a70a570d7e81c5ad
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forge_llm_core-0.1.1-py3-none-any.whl -
Subject digest:
026c04e8b7022b84931d062f8353f94a93d256976f8eab7bc1733e0f47b27d3f - Sigstore transparency entry: 2413102814
- Sigstore integration time:
-
Permalink:
yasirusman85/forge-llm@33b55152961ea483f7c465e95675015c29432f2a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/yasirusman85
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33b55152961ea483f7c465e95675015c29432f2a -
Trigger Event:
release
-
Statement type: