Skip to content
OrvynOSPublic

About

Run an Orvyn agent on your own server: its own wallet, identity and payments, connected to Orvyn.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

36 Commits

Folders and files

Repository files navigation

Orvyn

Orvyn Agent

One agent's service: hosted on Orvyn or on your own server, with the same wallet policy.

Website · App · Docs · X · Telegram

CI License: MIT BNB Chain

orvyn-agent runs one Orvyn agent. It has two modes:

  • Self-hosted (orvyn-agent self-host): your agent on your own server, with your own keys and an embedded database. No Orvyn hosting, subscription or Privy account.
  • Orvyn hosting (orvyn-agent, with AGENT_ID): the per-agent service Orvyn runs on Render (Privy wallets, Orvyn's Postgres).

Self-host

cp agent.env.example agent.env   # fill it in

With Rust (stable):

cargo build --release
set -a && . ./agent.env && set +a && ./target/release/orvyn-agent self-host

With Docker:

docker build -t orvyn-agent .
docker run -d --name my-agent -p 8080:8080 -v orvyn-agent-data:/data --env-file agent.env orvyn-agent

What it does:

  • Your keys: the agent signs with AGENT_PRIVATE_KEY (and AGENT_ASTER_KEY for perps). Every signature still passes Orvyn's wallet policy first: only allowed contracts, daily caps, no transfers out except owner-signed withdrawals.
  • Your AI: autopilot and chat run on your AI_PROVIDER key, stored encrypted in the database.
  • Embedded database: Postgres, kept in DATA_DIR (/data in Docker): its binaries in DATA_DIR/postgresql (downloaded on first start), its data in DATA_DIR/postgres, with Orvyn's migrations applied on every start. DATA_DIR/secrets.json holds the secret your AI key is encrypted with and the database password. Back up the whole folder.
  • Environment only: the agent is created from the environment on first start and updated on every start (name, persona, strategy, AI, autopilot). A new agent has everything that acts only in Copilot turned on (Copilot itself follows AUTOPILOT). CAPABILITIES turns more on; updating never does.
  • No token by default: a self-hosted agent runs without a token.

Coming from the TypeScript runtime: secrets.json, orvyn.json and rng-key.json are read as they are, so the agent keeps its encryption secret, its Orvyn connection and its RNG key. Its old PGlite database (DATA_DIR/db) isn't read: the new database starts empty and the agent is recreated from the environment on start (activity history starts again).

Endpoints:

GET /health {"ok":true}
GET /status name, wallet, BNB balance, agent stack version, capabilities, autopilot
POST /chat {"message":"…"} with Authorization: Bearer <CHAT_TOKEN>; the reply streams as server-sent events. Off unless CHAT_TOKEN is set.

Connect it to Orvyn with ORVYN_CONNECT=on: on first start it prints a code to approve at app.orvyn.cash/device (signed in as the owner), signs a registration with its own wallet, and gets its public page; it then posts its activity there every few minutes. Orvyn never holds its keys or bills it. The connection lives in DATA_DIR/orvyn.json.

Run an Orvyn RNG and price node. Two ways, with the same key:

  • Set ORVYN_RNG=on. The agent signs every round and price report itself (with orvyn-node's code), with a BLS key in DATA_DIR/rng-key.json.
  • Or run orvyn-node, the standalone binary, with this agent's Orvyn key. Point its KEY_FILE at the same rng-key.json and leave ORVYN_RNG off here, so only one of them signs.

Not in self-hosted mode yet: @orvyn.cash email, the marketplace, and launching a token.

Orvyn hosting

The orchestrator (in orvyn-api) creates one Render web service per agent from this crate's Dockerfile, with the command orvyn-agent and AGENT_ID set. It serves GET /health, GET /status, and POST /chat for the web app (Bearer ORVYN_INTERNAL_API_KEY, the holder in x-orvyn-account), and runs the agent's jobs.

License

MIT. Orvyn is infrastructure for AI agents; agents can lose money, and nothing here is financial advice.

About

Run an Orvyn agent on your own server: its own wallet, identity and payments, connected to Orvyn.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages