Step 1: sign up
Sign up at app.sapientpriors.com. Priors approves new organizations, and then you can sign in. The first person in an organization is its Org admin.Step 2: create a project
Create one project per product, for exampleMeeting notes and Knowledge base. Open Projects and choose New project. Give it a name, and pick at least one Project admin. You are picked by default.
Every organization also has a Default project. You can leave it empty.
Step 3: add your team
Open the project’s Members page and choose Add people. Enter each person’s email and pick a role:- Project admin for the engineers who build the product. They can create agents, service accounts, and keys in this project.
- Agent admin for people who teach a few chosen agents. Pick the agents in the same dialog.
- Contributor for everyone else. They can chat with every public agent in the project.
Step 4: create a service account and its key
A service account runs your product in production. Its keys keep working when people leave. On the project’s API keys page, choose Create key:- Name the key, for example
notes-prod, and pick how long it lasts. 365 days is the default. - Tick Mark as service account key, and pick its role:
- Project admin if your code creates and deletes agents, uploads and deletes files, and deletes memories. Most products need this.
- Agent admin or Contributor if your code only uses agents that someone creates by hand.
- Choose Generate key, and copy the key.
- The secret is shown once. Put it straight into your secret manager.
- Note the expiry date and plan the rotation. An expired key returns
401with no advance warning. - Create one service-account key for each environment, for example one for production and one for staging.
Step 5: give engineers their own keys
Engineers who test from their own machine create a personal key on the same page: Create key, leave Mark as service account key unticked, and confirm For building and testing, not production. A personal key cannot act for your customers. See Authentication.Step 6: check the key
200. api_key.acts_as.type is service_account, and api_key.project_id is the project you created.
401 unauthorized means the key is wrong, revoked, or expired. 400 invalid_request means the request carried Sec-Fetch-Site: call Priors from your server, never from a browser.
Step 7: create your first agent
202, with status: "initializing". The agent lives in the key’s project and is public, so it shows on the project’s Agents page. Poll GET/v2/agents/ every second until status is ready.
If it fails: 403 forbidden means the service account’s role cannot create agents: give it the Project admin role. 409 agent_quota_exceeded means the organization holds its maximum of live agents.
Next
- Your first agent, from start to finish: open a thread, teach the agent, and ask it a question.
- Call Priors from your own backend: one agent per customer, with
X-SP-End-User. - A meeting notetaker and A team knowledge base: two complete product designs.