A lightweight production ready agentic framework to build your agents
Project description
AgentPlanck
AgentPlanck is a a lightweight production ready agentic framework to build your agents.
✨ Features
- Dynamic Pydantic model generation for structured outputs.
- Message managers for clean communication flow.
- MCP handlers for flexible tool interaction.
- Fault tolerance mechanisms to keep agents running reliably.
- And more to explore! 🚀
🔬 Why "AgentPlanck"?
The name comes from Max Planck and the Planck constant, which defines the smallest "action" in physics.
It’s fitting for a system that takes intelligent actions at minimal scales.
⚡ Quick Start
import asyncio
from agentplanck import Agent, ToolsController, ToolResult
from pydantic import BaseModel
from langchain_openai import ChatOpenAI
from dotenv import load_dotenv
load_dotenv()
llm = ChatOpenAI(model="gpt-4o")
class CheckWeather(BaseModel):
city: str
class ExecDb(BaseModel):
query: str
async def main():
tools_controller = ToolsController()
@tools_controller.tool("Check weather", param_model=CheckWeather)
async def check_weather(params: CheckWeather) -> ToolResult:
return ToolResult(content="Weather is hot, about 35°C")
@tools_controller.tool("Interact with database", param_model=ExecDb)
async def sql(params: ExecDb) -> ToolResult:
return ToolResult(content="Successfully executed query")
agent = Agent(
"Check weather of San Francisco and insert to my db",
llm=llm,
tools_controller=tools_controller
)
res = await agent.run()
print(res)
if __name__ == "__main__":
asyncio.run(main())
📜 License
MIT License. Free to use and modify.
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 agent_planck-0.1.2.tar.gz.
File metadata
- Download URL: agent_planck-0.1.2.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6772873448c0c8592e429af4783bf86acdc47e5d3515855506e443754021d333
|
|
| MD5 |
6d063cb07c02c0388f561c0131943ebf
|
|
| BLAKE2b-256 |
86ea4fb4b419e452fe1f853ffddd1e575208086a74d5d16415360601dbcd0bb9
|
File details
Details for the file agent_planck-0.1.2-py3-none-any.whl.
File metadata
- Download URL: agent_planck-0.1.2-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbaa88c8a037f7c00e93907a56de1baa6eb346dc4c13f0e1e1a56ebc1999c237
|
|
| MD5 |
b5f9503a7498a01a17e9a3ea0e1bfcf3
|
|
| BLAKE2b-256 |
b89ec13a217b59162176f3b0e165209b1e931359f32c32595607513d1badf765
|