Skip to main content

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.

Release files for agent-planck 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-planck 0.1.2
File Size Uploaded
agent_planck-0.1.2.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-planck 0.1.2
File Interpreter ABI Platform
agent_planck-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 39.1 kB

Release files / agent_planck-0.1.2.tar.gz

Download URL agent_planck-0.1.2.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6772873448c0c8592e429af4783bf86acdc47e5d3515855506e443754021d333
BLAKE2b-256 checksum
How to use checksums
86ea4fb4b419e452fe1f853ffddd1e575208086a74d5d16415360601dbcd0bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release files / agent_planck-0.1.2-py3-none-any.whl

Download URL agent_planck-0.1.2-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbaa88c8a037f7c00e93907a56de1baa6eb346dc4c13f0e1e1a56ebc1999c237
BLAKE2b-256 checksum
How to use checksums
b89ec13a217b59162176f3b0e165209b1e931359f32c32595607513d1badf765
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page