Toolkit for Persona, an agent AI system — provides modular, callable tools for dynamic function execution
Project description
Persona CLI
Persona CLI is a command-line tool for creating and managing projects that use the persona-toolkit — a modular
function-calling framework designed for agent-based systems.
This CLI helps you scaffold projects, generate tools, test them locally, and run the FastAPI server that exposes your tools via REST API.
🚀 Installation
To use the CLI, first install the persona-toolkit library (assuming it's published or available locally):
pip install persona-toolkit
Or if you're developing locally:
cd persona-toolkit/
poetry install
The CLI is exposed as:
persona-toolkit
📆 Features
init
Create a new project scaffold with Poetry and the required structure:
persona-toolkit init my-project
This will:
- Initialize a Poetry project
- Install
persona-toolkitas a dependency - Create a
tools/folder where your tools will live
add-tool
Add a new tool interactively:
persona-toolkit add-tool
You'll be prompted for a tool name. A new Python file will be created in the tools/ directory with a ready-to-edit
template including:
InputandOutputmodels (using Pydantic)- A
run()function
test-tool
Test a tool locally by manually entering its input values:
persona-toolkit test-tool echo
This will:
- Import the specified tool from the
tools/directory - Prompt for input fields
- Run the
run()function and show the output
run
Start the FastAPI server and expose your tools via HTTP:
persona-toolkit run --port 8000
You can now access:
GET /tools— list available toolsGET /tools/{tool}/schema— get tool schemaPOST /invocations— run a tool
🗂 Project Structure
my-project/
├── pyproject.toml # Poetry project config
├── tools/
│ └── echo_test.py # Example tool
Each tool must define:
NAME(a str with tool name)Input(a Pydantic model)Output(a Pydantic model)run(input: Input, **kwargs) -> Output
kwargs includes:
project_id,session_idanduser_id
💡 Example Tool
# tools/echo_test.py
from pydantic import BaseModel, Field
NAME = "echo"
class Input(BaseModel):
message: str = Field(description="Message to echo")
class Output(BaseModel):
message: str
def run(input: Input, **kwargs) -> Output:
"""Echo the message back"""
return Output(message=f"Echo: {input.message}")
✅ Requirements
- Python 3.10+
- Poetry
- Uvicorn (installed automatically)
📃 License
MIT License
Built for the Persona Agent System 🤖
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 persona_toolkit-1.0.15.tar.gz.
File metadata
- Download URL: persona_toolkit-1.0.15.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.10.16 Linux/6.1.79
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b864e7a61853094f351d4d91f6992f21b93c569c8d0e2177f9965f5cf0cf3f3
|
|
| MD5 |
ccfdf599ef29c07cca90865115cd51aa
|
|
| BLAKE2b-256 |
62aae574e63154f63c715e0ee43bdb776afbf2edc29aa430aca9c01f91020eba
|
File details
Details for the file persona_toolkit-1.0.15-py3-none-any.whl.
File metadata
- Download URL: persona_toolkit-1.0.15-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.10.16 Linux/6.1.79
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0f508145c0ee1510f8fbf5ecaccd7e930c0fd56b72f09c60f0ab505be7800e4
|
|
| MD5 |
e10670e064ef9d8bd397cb8f67ea60dc
|
|
| BLAKE2b-256 |
2d789ba79c59566d2e9914e1df0fa2d97e594f179630838918afe416228fbd55
|