Precompiled Agents Workflow Network (P.A.W.N.) for building AI-driven, multi-agent crypto systems.
Project description
Precompiled Agents Workflows Network (P.A.W.N. ♟️)
Precompiled Agents Workflows Network is a multi-package project that provides prebuilt agent workflows for blockchain and crypto agents. PAWN workflows are implemented using Langgraph Supervisor, ensuring maximum composability for agent systems. PAWN also allows seamless integration with various agent frameworks, such as GOAT.
How to Install?
You can install the base package along with only the dependencies you need. For example:
- Basic installation:
pip install pawn-ai
- Installation with a specific submodule (e.g., llamafeed_worflow):
pip install pawn-ai[llamafeed_worflow]
- Installation with multiple submodules:
pip install pawn-ai[goat_evm_workflow,goat_solana_workflow]
The extras allow you to install only the dependencies relevant to the submodules you intend to use.
Integration
PAWN offers several integration options for incorporating agent workflows into your system:
1. Integrating with an Existing Supervisor-Based System
If you already have a supervisor-based agent system, you can attach PAWN's precompiled workflows directly.
For example:
from pawn.llamafeed_workflow import LlamaFeedWorkflow
team1 = ...
team2 = LlamaFeedWorkflow()
custom_workflow = create_supervisor(
agents=[team1, team2.workflow],
model=model,
prompt=(
"You are a team supervisor managing three teams:"
...
)
)
This approach allows you to seamlessly integrate PAWN's workflows as additional tools in your existing system. See more here.
2. Using the Workflow as a Tool (Agent as a Tool Pattern)
PAWN workflows can also be used as tools within your agent's framework. This approach follows the "agent as a tool" pattern described in the LangGraph documentation.
For example using OpenAI Agents SDK:
import asyncio
from agents import Agent, Runner, function_tool
from pawn.hyperliquid_trader_workflow import HyperliquidWorkflow
@function_tool
def get_price(symbol: str) -> float:
workflow: HyperliquidWorkflow = HyperliquidWorkflow()
response = workflow.invoke(f'What is the price of {symbol}?')
...
return result
agent = Agent(
name="Price Fetcher",
instructions="You are a helpful agent that can fetch price of crypto.",
tools=[get_price],
)
async def main():
result = await Runner.run(agent, input="What's the price of bitcoin?")
print(result.final_output)
if __name__ == "__main__":
asyncio.run(main())
This integration leverages PAWN's workflows as modular tools that can be called by your agent system when needed.
3. Running the Workflow as a Standalone FastAPI or fastMCP Server
You can also run a PAWN workflow as an independent service using FastAPI (or a similar framework like fastMCP). This allows you to deploy the workflow as a RESTful API. For example, using FastAPI:
from fastapi import FastAPI
from pawn.goat_evm_workflow import EVMAgenticWorkflow
app = FastAPI()
workflow = EVMAgenticWorkflow()
@app.post("/invoke")
def invoke_workflow(payload: dict):
return workflow.invoke(payload)
This will launch a standalone server where you can access the workflow via HTTP.
Contributing
Contributions are welcome! Please ensure that your changes are well-documented and include examples.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 pawn_ai-0.0.2.tar.gz.
File metadata
- Download URL: pawn_ai-0.0.2.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f4ec823d8b4e068a9d03a80b64c819e0c7b180730830aa0824e06e28e4bba44
|
|
| MD5 |
c0ae13b68d1a0c7e8bfbd7d4e03f22dd
|
|
| BLAKE2b-256 |
46115f1fea1f07f040468c5d64fadd1a4ed956186e9374ae7c280a8d2d15ba18
|
File details
Details for the file pawn_ai-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pawn_ai-0.0.2-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
625c17dd17501c858576416c7832cc59c43dcfa7e591d16000a4b743b5fba069
|
|
| MD5 |
f2ef000f3173c03e4c90c7d9d4d174d1
|
|
| BLAKE2b-256 |
90a0814358e1ff0b5e6ac766fb57c54ba66b469032ef002fea3b8358f6828761
|