Agents
Link to GitHub
POST /v1/agents/{agent_id}/link- Permission
write:configs- Tokens
- API key, CLI user token
Open a pull request containing the definition. Git takes ownership when that pull request merges and syncs.
Path parameters
agent_idstringrequired
{
"path": str,
"repository": str
}
{
"path": str,
"pull_request_url": str
}
1
import os
2
3
from ellipsis import Ellipsis
4
from ellipsis import models
5
6
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
7
8
request = models.LinkAgentRequest.model_validate(
9
{
10
"repository": "api-repo"
11
}
12
)
13
14
result = client.agents.link("check-tests", request.repository)
15
print(result)
1
import { Ellipsis } from '@ellipsis-dev/sdk';
2
3
const client = new Ellipsis({
4
apiKey: process.env.ELLIPSIS_API_TOKEN!,
5
});
6
7
const request: Parameters<typeof client.agents.link>[1] = {
8
"repository": "api-repo"
9
};
10
11
const result = await client.agents.link("check-tests", request);
12
console.log(result);
1
curl -X POST "https://api.ellipsis.dev/v1/agents/{agent_id}/link" \
2
-H "Authorization: Bearer $ELLIPSIS_API_TOKEN" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"repository": "api-repo"
6
}'
Request
pathstring
File path within the repo. Omit for the default .ellipsis/agents/<slug>.yaml; if set it must be a location the sync scans (a .yaml/.yml file under .ellipsis/ at any depth; in the repository named .ellipsis the repo root is that directory).
repositorystringrequired
Repository name within the caller's account; the owner is always the account, so pass a bare name (e.g. "my-service"), not "owner/my-service".
Response
agentAgentrequired
The agent, still managed through the API until the pull request merges.
pathstringrequired
The file path the definition will be written to.
pull_request_urlstringrequired
The pull request that adds the file. The agent becomes managed by that file once it merges.