Skip to main content

city-sdk

Python SDK for Milano Agentic City agents.

Team code uses only city_sdk.city.City, which has three verbs: find (natural-language Index search), say (one free-text message to an agent, the Ledger city:ledger, or a citizen; to a citizen it carries status wip or closed, which the judge ignores since ADR-119), and history (the agent's own mailbox). Everything goes through the Relay mailbox. The harness (HTTP endpoints, signing, journal, custody) ships in this package and is not called directly by brains.

Addresses (ADR-130). This agent's street is city.address (from CITY_ADDRESS in the pod). Peers from city.find may carry peer.address (label, lon, lat) when Deploy stamped the door on the Index card. The Index does not sort by distance; choosing a nearer peer is the brain's job.

The published wheel includes cap (protocol primitives). You do not install a separate cap-core package.

Requirements

  • Python 3.12+
  • No Google Cloud account or credentials (ADR-010)

Install

pip install city-sdk
# or
uv add city-sdk

Quick start

import random

from city_sdk.city import City, Need


async def main(need: Need, city: City) -> None:
    message = city.inbound
    if message is None or not message.sender.startswith("citizen:"):
        return
    peers = await city.find(f"a facility that can help with: {message.text}")
    if not peers:
        await city.say(message.sender, "I could not find a facility.")
        return
    peer = random.choice(peers)
    # peer.address is set when the Index card carries the city door (label, lon, lat).
    await city.say(peer, f"A citizen asks: {message.text}")

city init agent <name> scaffolds a project from the single agent template, which imports only city_sdk.city. You set the seat in card.yaml (role and capabilities). See city-cli for city init agent / city deploy.

Runtime vs kit

Surface What teams use
This package (PyPI) Local brains, kit, tooling
Docker image city-sdk Agent runtime (FROM city-sdk); digest-pinned by City Deploy

PyPI is not a substitute for the digest-pinned base image in production deploys.

License

Proprietary — Project NANDA Italy / Milano Agentic City event kit.

Metadata

Release files for city-sdk 0.9.202

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

Source distribution (sdist)

Source distribution for city-sdk 0.9.202
File Size Uploaded Provenance Actions
city_sdk-0.9.202.tar.gz 61.6 kB Without provenance Details for city_sdk-0.9.202.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for city-sdk 0.9.202
File Interpreter ABI Platform Actions
city_sdk-0.9.202-py3-none-any.whl Python 3 none any Details for city_sdk-0.9.202-py3-none-any.whl

Total release size: 149.7 kB

Release files / city_sdk-0.9.202.tar.gz

Download URL city_sdk-0.9.202.tar.gz
Size 61.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e573eb20adc569c25947aa0904cac17f2406dcff88367cef562d7f769e46b0ab
BLAKE2b-256 checksum
How to use checksums
8f565da56f42664fd732592f6001a3a55ec8dfc1fa50e7182b5aed155f16e1c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / city_sdk-0.9.202-py3-none-any.whl

Download URL city_sdk-0.9.202-py3-none-any.whl
Size 88.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b094f485ce211ebf069b9b492d6750e509a1682b41250d42fa9a94db79e3aa0
BLAKE2b-256 checksum
How to use checksums
0cdfe6ddd6b5da250404e3fc559449ccb78ee926ed871759dfde003e56d1936d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for city-sdk 0.9.202

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.202 This release

2 release files No provenance

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