Skip to main content

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-cli

📆 Features

init

Create a new project scaffold with Poetry and the required structure:

persona-cli init my-project

This will:

  • Initialize a Poetry project
  • Install persona-toolkit as a dependency
  • Create a tools/ folder where your tools will live

add-tool

Add a new tool interactively:

persona-cli 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:

  • Input and Output models (using Pydantic)
  • A run() function

test-tool

Test a tool locally by manually entering its input values:

persona-cli 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-cli run --port 8000

You can now access:

  • GET /tools — list available tools
  • GET /tools/{tool}/schema — get tool schema
  • POST /tools/{tool}/invocations — run a tool

🗂 Project Structure

my-project/
├── pyproject.toml         # Poetry project config
├── tools/
│   └── echo.py            # Example tool

Each tool must define:

  • Input (a Pydantic model)
  • Output (a Pydantic model)
  • run(input: Input) -> Output

💡 Example Tool

# tools/echo.py

from pydantic import BaseModel, Field


class Input(BaseModel):
    message: str = Field(description="Message to echo")


class Output(BaseModel):
    message: str


def run(input: Input) -> Output:
    """Echo the message back"""
    return Output(message=f"Echo: {input.message}")

✅ Requirements

  • Python 3.9+
  • Poetry
  • Uvicorn (installed automatically)

📃 License

MIT License


Built for the Persona Agent System 🤖

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

persona_toolkit-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

persona_toolkit-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

persona_toolkit-0.1.0-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file persona_toolkit-0.1.0.tar.gz.

File metadata

  • Download URL: persona_toolkit-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for persona_toolkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8f4c9419918d5cd33ce8164698639021e21bcdedc6a0de4e020bb9cecd6f8d09
MD5 f6d20078735159c0bb7fee4b6daeb2bb
BLAKE2b-256 4c4c525ba32495c630c407afedc22cfe4e2d405fd2607b87bd4f03338ec5175b

See more details on using hashes here.

File details

Details for the file persona_toolkit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: persona_toolkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for persona_toolkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8d5bf9de063d5164c5a71c5fba51fe32130ae34e03e9ee053ed0f27721f12d5
MD5 53f4e172ef898c47c49c3db824a13c29
BLAKE2b-256 55a429b82aa4bf678c1907ecdf5444a38f6567e659ab56d1029bffe4bc559f39

See more details on using hashes here.

File details

Details for the file persona_toolkit-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: persona_toolkit-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for persona_toolkit-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eeedd3318db63eea670b7b984b85ade37c95c930d9cf377515871aff42e8690d
MD5 2264befca6b8190074264dbfbae37810
BLAKE2b-256 caee5d1d5c4f2a1ebd732b3d3928f59a8a09df80b0061d4fd14878b9a7d3e821

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page