Vibe Coding
Back to FastClaw

FastClaw / APIs and integrations

User and Key

The key to production access to FastClaw is not to just issue an API key, but to design app_user, end user, Agent ACL, quota and session isolation.

User and Key key concepts infographic
User and Key key concepts infographic

Key type

FastClaw keys have three types: admin, user, and agent. Admin is suitable for background operation and maintenance, user is suitable for a console user, and agent key is suitable for exposing only a single Agent capability.

TypeSuitable for the scenerisk
adminServer management, internal tasksMaximum authority and should not appear on the client
userThe upstream server is called by user agentRequires ACL and quota
agentOnly call specific AgentsStill need to prevent leakage and misuse

app_user model

docs/upstream-api.md supports explicit POST /v1/users binding external_id, and also supports lazy creation through user or X-Fastclaw-End-User during chat.

1

Upstream login

Your product completes its own login and billing.

2

Map users

Pass the product user ID to FastClaw user or X-Fastclaw-End-User.

3

Quarantine session

FastClaw partitions session, memory, USER.md by end user.

4

Query usage

Access your own bills or limits through /v1/usage and quota.

Session Key

X-Fastclaw-Session-Key is used to make the same upstream session fall stably to the same FastClaw session. When there is no explicit session key, the server will generate it or map it according to default rules.

Recommended practices

Design the session key to be the product session ID, not the user ID itself; the same user may have multiple different contexts open at the same time.