7 min read
Share AI Context With Third-Party Agents Using Scoped Tokens
Learn how to share AI chat context with third-party agents using scoped share tokens. Control read, append, and write access with automatic expiry for secure agent handoffs.
share AI contextAI agent handoffscoped share tokensAI context sharingthird-party AI agents+3 more
Sharing AI conversation context with another agent sounds simple until you consider security. You want the agent to have enough context to continue the work, but not unlimited access to your entire chat history forever. Scoped share tokens in AI Context Vault solve this with granular permissions and automatic expiry.
## The Agent Handoff Problem
Modern AI workflows often involve multiple tools: you brainstorm in ChatGPT, refine in Cursor, deploy via a CI agent, and review in a custom script. Each tool needs conversation context from the previous step, but sharing raw chat exports creates problems:
- **Over-permissioned access**: The receiving agent sees everything, forever
- **No audit trail**: You cannot control what the agent modifies
- **Stale context**: Old conversations linger without expiry
- **Format friction**: Different tools expect different context formats
Scoped share tokens provide controlled, time-limited, permission-specific access to exactly the context an agent needs.
## What Are Scoped Share Tokens?
A share token (actx_sh_…) is a temporary credential that grants a third-party agent access to a specific saved context in AI Context Vault. Unlike API keys, share tokens:
- Access only one context (not your entire vault)
- Have explicit permission scopes (read, append, write)
- Expire after a set number of hours
- Do not require the agent to have an AirClippy account
Create tokens in the AI Context Vault dashboard at airclippy.com/ai-context or via the API.
## Permission Scopes Explained
### Read Scope
The agent can pull the full context — all messages and metadata — but cannot modify anything. Use read scope when an agent only needs to understand prior conversation to generate a response.
Agent call:
GET https://airclippy.com/api/v1/share/actx_sh_YOUR_TOKEN
### Append Scope
The agent can add new messages to the context thread without replacing existing ones. Use append scope when an agent should contribute to an ongoing conversation — for example, adding its analysis or results to a project thread.
Agent call:
PATCH https://airclippy.com/api/v1/share/actx_sh_YOUR_TOKEN
Body: { "append": true, "messages": [{ "role": "assistant", "content": "..." }] }
### Write Scope
The agent can fully update the context, including replacing messages and metadata. Use write scope only when you trust the agent to manage the entire context object.
Grant the minimum scope needed. Most handoffs require read only or read plus append.
## How to Mint a Share Token
### Via Dashboard
1. Sign in at airclippy.com/ai-context
2. Open the Contexts tab and select your saved context
3. Scroll to Share with an agent
4. Check the scopes you need (read, append, write)
5. Set expiry in hours (default 24)
6. Click Mint share token
7. Copy the token — it is shown once
### Via API
curl -X POST https://airclippy.com/api/v1/contexts/CONTEXT_ID/share \
-H "Authorization: Bearer actx_sk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"scopes": ["read", "append"],
"ttlHours": 24,
"label": "Agent B handoff"
}'
The response includes the token and expiry timestamp.
## Real-World Handoff Scenarios
### Developer to Code Review Agent
Save your Cursor session context with architecture decisions. Mint a read-only token with 12-hour expiry. The review agent pulls context, analyzes the code against documented decisions, and returns findings — without modifying your thread.
### Project Manager to Writing Agent
Save meeting notes and decisions as a context. Grant read plus append scope. The writing agent pulls context, drafts a summary, and appends the draft as an assistant message for your review.
### Research Agent to Summary Agent
A research agent appends findings to a shared context throughout the day. At end of day, mint a read-only token for a summary agent that pulls the full thread and generates an executive brief.
### Multi-Agent Pipeline
Agent A saves initial context. Agent B gets append scope and adds analysis. Agent C gets read scope and produces final output. Each agent accesses the same growing thread with appropriate permissions.
## Security Considerations
### Token Expiry
Always set the shortest practical expiry. A 24-hour token covers most handoffs. For sensitive context, use 1 to 4 hours.
### Scope Minimization
Never grant write scope unless the agent genuinely needs to replace context. Read plus append covers most collaborative workflows.
### One-Time Display
Share tokens are shown once when created. Store them securely in your agent's environment variables, not in code repositories.
### Revocation
Delete the parent context to invalidate all associated share tokens immediately. You can also wait for natural expiry.
### Private by Default
Contexts in the vault never appear in AirClippy's public global clipboard. Only token holders can access shared context.
## Integrating Share Tokens in Your Agent
Minimal Python example:
import os, requests
token = os.environ["AIRCLIPPY_SHARE"]
base = "https://airclippy.com/api/v1/share"
# Pull context
ctx = requests.get(f"{base}/{token}").json()
messages = ctx["context"]["messages"]
# Run your LLM with full context
# ... your agent logic here ...
# Append results (if append scope granted)
requests.patch(f"{base}/{token}", json={
"append": True,
"messages": [{"role": "assistant", "content": "Analysis complete."}]
})
The agent never needs your API key — only the scoped share token.
## Share Tokens vs API Keys
| Feature | API Key | Share Token |
| Access scope | All your contexts | One specific context |
| Permissions | Full CRUD | Scoped (read/append/write) |
| Expiry | Until revoked | Automatic TTL |
| Agent needs account | No | No |
| Best for | Your own scripts | Third-party agent handoff |
Use API keys for your own automation. Use share tokens when handing context to external agents, contractors, or tools you do not fully control.
## Limits
- 20 share grants per context
- Token expiry up to 30 days (720 hours)
- Share tokens inherit the parent context's TTL
See airclippy.com/ai-context/docs for current limits.
## Start Sharing Context Securely
Scoped share tokens turn AI context handoffs from all-or-nothing exports into controlled, expiring, permission-specific access. Mint your first token in AI Context Vault and give your agents exactly the context they need — nothing more.
Related Keywords
share AI contextAI agent handoffscoped share tokensAI context sharingthird-party AI agentsAI Context Vaultshare chat contextAI context tokens
