Skip to content

Keys

We never store your keys. Your real key never leaves your machine: calls made with a guest’s key are made from your machine, so access pauses when your machine is offline.

API keys live in a local encrypted vault. Agents and the programs they start never see a value: they get a placeholder (lp_sealed_<20 hex>) and the local key service (LogicPacks keys) swaps it for the real value only on HTTPS requests to the hosts that key allows.

Add, list, remove

lp key add OPENAI_API_KEY --provider openai          # prompts for the value (hidden); or pipe it on stdin
printf %s "$VALUE" | lp key add MY_KEY --hosts api.example.com
lp key ls                                            # names, masked hints (sk-…f3Q), hosts, packs
lp key policy OPENAI_API_KEY --hosts api.openai.com --packs invoice-reconciliation --rate 60
lp key kill OPENAI_API_KEY                           # deletes it and revokes every grant made from it

Known providers (--provider openai, anthropic, groq, stripe, github, resend, ...) fill in their API hosts. Without hosts a key can't be sent anywhere. The value is never a command argument: lp reads it from a hidden prompt or stdin.

Use

lp run --keys OPENAI_API_KEY -- python3 make.py    # env OPENAI_API_KEY=lp_sealed_...; HTTPS goes through LogicPacks keys
lp run --pack invoice-reconciliation               # keys = the pack's needs.env; runs its route's command
lp keys --json                                     # overlay for agents: which keys each space/pack can use, masked

lp run sets HTTPS_PROXY to LogicPacks keys and trusts a local CA for the child (Python, Node, curl, git, requests, AWS SDK, Deno). For an allowed host LogicPacks keys decrypts the TLS, replaces the placeholder in the URL, headers and body, forwards the request, and replaces the value with the placeholder again in the response. Other hosts are passed through untouched. --inject puts real values in the env instead (last resort for tools that ignore proxies). It is logged and flagged.

The local key service

LogicPacks keys runs as a small local service. It starts on demand when a run needs keys and stops after 15 idle minutes; if you host keys for others it can be set to run from login instead. It listens on 127.0.0.1 only (proxy port 7480, relay port 7481). Each LP_HOME gets its own service, and the service file names its LP_HOME explicitly. A non-default LP_HOME refuses to start the service on a default port that is already taken, so a test home can't take over the real one or its key records.

Letting a teammate use a key

lp share OPENAI_API_KEY @haroon --ttl 7d   # an invite; @haroon runs: lp invite accept <id>
lp host up                                 # Cloudflare quick tunnel to your LogicPacks keys relay; keep this machine on

@haroon then runs lp run --keys OPENAI_API_KEY -- ... like a local key. His LogicPacks keys service gets a signed ticket (valid 15 minutes at most) from the registry and sends the request through your tunnel; your LogicPacks keys service checks the ticket, the grant, the key's hosts, packs and rate, injects the value and forwards. The value never leaves your machine except to the allowed API host. lp revoke OPENAI_API_KEY --from haroon (or lp unshare OPENAI_API_KEY @haroon) stops it at once; lp grants lists grants; lp host down closes the tunnel. Needs cloudflared (mac: brew install cloudflared; Windows: winget install Cloudflare.cloudflared).

Roadmap (not built yet)

  • Allow or block specific endpoints per person (today: per host).
  • Block specific queries.
  • A call log you can view per person (today: local log lines on your machine).
  • Changing the rules by asking your agent.
  • The github.com to logicpacks.io converter, with mock endpoints and demo data.