Skip to content

Enforce bria_call usage and prefer agent_api_token#42

Open
Levdavid1 wants to merge 2 commits into
devfrom
feature/agent-api-key-type
Open

Enforce bria_call usage and prefer agent_api_token#42
Levdavid1 wants to merge 2 commits into
devfrom
feature/agent-api-key-type

Conversation

@Levdavid1

Copy link
Copy Markdown
Contributor

Summary

  • SKILL.md: Reframes llms.txt reference to mandate bria_call for all API calls (ensures User-Agent: BriaSkills header is always applied)
  • SKILL.md: Credential loading now prefers agent_api_token over api_token
  • SKILL.md: Token introspection saves both api_token and agent_api_token to credentials
  • bria_client.sh: Reads agent_api_token first, falls back to api_token
  • auth-device-flow.md: Same token loading/saving changes + mandate note for bria_call

Context

Agents were sometimes curl-ing Bria endpoints directly (bypassing bria_call), which omitted the User-Agent header and caused agentic calls to go uncounted in dashboards. This PR:

  1. Enforces bria_call usage so User-Agent is always present
  2. Introduces agent_api_token preference so agent traffic uses a dedicated key type

Depends on bria-internal and spring PRs for the backend AGENT key type.

Test plan

  • Fresh agent auth → credentials file contains both api_token and agent_api_token
  • bria_call reads agent_api_token when present
  • bria_call falls back to api_token when agent_api_token is missing
  • Verify User-Agent: BriaSkills header is sent on every bria_call

Made with Cursor

- Reframe llms.txt reference to mandate bria_call for all API calls
  so User-Agent header is always applied
- Prefer agent_api_token over api_token in credential loading
- Store agent_api_token alongside api_token after introspection
- Update bria_client.sh to read agent_api_token first

Made-with: Cursor
Update the curl call in auth-device-flow.md and SKILL.md to pass
client_type so the auth server provisions the correct api key type.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant