Skip to main content

Universal FastAPI and FastMCP gateway backed by a local Pi AgentSession

Project description

Agentify Cloud

Agentify Cloud turns a local Pi agent into a universal HTTP and MCP server. It runs one Python service with FastAPI and FastMCP on the same port, then delegates arbitrary GET requests, POST requests, and MCP tool calls to a Pi AgentSession.

The distribution package is named agentify-cloud. The Python import package and primary CLI command are agentify.

Usage

Install from PyPI:

uv pip install agentify-cloud

Or install from the project checkout:

uv pip install -e .

Start the server:

agentify server --port 8000

The server listens on 0.0.0.0:8000 by default and exposes:

  • HTTP GET and POST handling for any path
  • an MCP server mounted at /mcp
  • an embedded local Pi AgentSession bridge from src/vendor/pi

AGENTIFY_PI_URL is optional. Set it only when you want to use an external or already-running Pi AgentSession endpoint instead of the embedded runtime.

Login

Record a Pi backend selection:

agentify login --backend <backend-name-or-url>

Without --backend, the command prompts for a backend value:

agentify login

HTTP GET

Send any GET request to the server:

curl http://127.0.0.1:8000/dashboard/today

Agentify Cloud builds a prompt from the endpoint and asks Pi to produce HTML. The response is returned as text/html.

HTTP POST

Send any POST request to any path:

curl -X POST http://127.0.0.1:8000/tasks/create \
  -H 'content-type: application/json' \
  -d '{"instruction":"create a task summary","title":"Ship README"}'

Agentify Cloud sends the endpoint, decoded instruction field when present, raw body text, and requested json format to Pi. The JSON response from Pi is relayed back to the caller.

API Keys

Require callers to provide an API key:

agentify server --port 8000 -api_key abc123,def456

Or read one key per line from a file:

agentify server --port 8000 -api_key_file ./keys.txt

Clients may authenticate with either header:

curl http://127.0.0.1:8000/anything -H 'Authorization: Bearer abc123'
curl http://127.0.0.1:8000/anything -H 'x-api-key: abc123'

MCP

Connect an MCP client to the server's /mcp endpoint. The server exposes a generic agentify tool that forwards tool payloads to Pi and returns the JSON result.

Make Targets

Common local commands:

make install
make dev
make run PORT=8000
make test
make build
make publish-check

make publish-check builds fresh artifacts and prints the upload command without uploading. make publish performs a real registry upload and should only be run when publishing is explicitly intended.

Design Philosophy

Agentify Cloud is a thin gateway, not an application framework. The server should accept broad HTTP and MCP input shapes, translate them into clear prompt contracts, and let the Pi agent decide the content of the result.

The gateway validates transport and envelope shape only. For POST and MCP calls, that means Pi must return JSON. For GET calls, Pi must return JSON containing an HTML content string. Agentify Cloud does not validate the semantic content because the point is to make the agent universally reachable through common protocols.

Local use should work without external service setup beyond the packaged Pi runtime. The embedded Pi AgentSession bridge is the default path, while AGENTIFY_PI_URL remains an advanced override for users who already operate a separate Pi backend.

Release and runtime behavior should stay boring: explicit commands, fresh build artifacts, bounded retries, clear errors, and no hidden publishing steps.

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

agentify_cloud-0.1.2.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

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

agentify_cloud-0.1.2-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file agentify_cloud-0.1.2.tar.gz.

File metadata

  • Download URL: agentify_cloud-0.1.2.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for agentify_cloud-0.1.2.tar.gz
Algorithm Hash digest
SHA256 63f79fdca8bc65742102f435f23efa35dcd995b610dfa674573edb74192e1b44
MD5 1eecbf2bf1dc43c3b82aae1c4b0d0a92
BLAKE2b-256 edd1930760af6dc788dc843b9274bad3d38a005cb99bdf9255a84039abb62996

See more details on using hashes here.

File details

Details for the file agentify_cloud-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: agentify_cloud-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for agentify_cloud-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4864c9fb5495a1a0e3eb7d351dca5a71bf34100e36552159cbcbd401e2bd61e9
MD5 978df23a57d7617c72928f80ac874e05
BLAKE2b-256 be3333832db17a6e0e078bc863cbc19faa66033fbb911d4cf91c0df4f6d4ad55

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