Kyno
Menu

Kyno quick start

Python 3.11 or later is required. These commands create a local Kyno workspace and an HTTP server backed by SQLite.

pip install kyno
kyno new acme && cd acme  # the workspace: this instance's config and store
kyno db init
printf 'constitution_key: default\nmission: Ship a lending product people trust\n' > constitution.yaml
kyno apply constitution.yaml --note "initial constitution"
kyno current
export APP_TOKEN="$(kyno token add agents --scope read)"
kyno remote add --url http://127.0.0.1:2256/mcp --token-env APP_TOKEN
kyno serve --transport http

kyno current prints the direction and its version. The HTTP server serves it over MCP, a protocol for tools and resources, and checks a bearer token on every request. The remote profile records the URL and the name of your token variable, not its value.

Leave the server running. In another terminal, make the token available as APP_TOKEN too, then run the Python example below. To mint a separate read token for that terminal, run export APP_TOKEN="$(kyno token add reader --scope read)" from the same workspace. Keep tokens out of source control.

import kyno

with kyno.connect() as connection:
    direction = connection.binder().bind()
    print(direction.version, direction.mission)

This reads direction through the SDK without an agent framework. It uses the default profile created above. You can also pass values the application already owns: kyno.connect(url=KYNO_URL, token=APP_TOKEN). The SDK does not read KYNO_URL or KYNO_TOKEN by name.

Failure behavior and limits

The SDK must establish a connection before it can read direction. If the initial connection fails, kyno.connect() raises KynoUnavailableError. See connection troubleshooting.

Once connected, current direction depends on a successful pull. By default, a failed pull is logged and the binder uses cached direction, or empty version 0 if it has never fetched direction. Set PullPolicy(fail_closed=True) on the binder to raise an error instead. See adapter failure policies before deploying.

Receiving principles does not mean following them. Kyno does not establish that an action is aligned or safe, and a direction update does not rewrite an active task or replan the workflow. Your application owns optional output verification, including the choice of verifier and whether to continue, retry, or stop.

Connect your agents

Continue with the CrewAI guide or LangGraph guide. View the recorded demo to see direction change during a workflow.

Maintained with Kyno 1.x documentation. View Markdown source

View the demoRead the FAQ