Agent SDK Guide
Python SDK
Installation
pip install neurova-agent
Initialization
agent = NeurovaAgent(
key_id="your_key_id",
secret_key="your_secret_key",
base_url="https://your-site.com"
)
```
### Publishing a release
print(f"Release created with ID: {release['id']}") ```
Managing documents
# update a document
agent.docs.update(doc['id'], {
'title': 'Updated title'
})
# list documents
docs = agent.docs.list(category="getting-started")
```
## JavaScript SDK
### Installation
npm install @neurova/agent-sdk
### Usage
const agent = new NeurovaAgent({ keyId: 'your_key_id', secretKey: 'your_secret_key', baseUrl: 'https://your-site.com' });
// publish a release const release = await agent.releases.create({ version: 'v1.0.0', title: 'New release', newFeatures: ['Feature one'] });
console.log('Release created:', release); ```
HTTP request examples
With curl
# create a release
curl -X POST "https://your-site.com/api/agent/releases.php" \
-H "Authorization: Bearer <key_id>|<secret_key>" \
-H "Content-Type: application/json" \
-d '{
"version": "v1.0.1",
"title": "New release",
"new_features": ["A new feature"]
}'
```
### With Python requests
def neurova_request(method, path, data=None, auth=None): headers = { "Content-Type": "application/json", "Authorization": f"Bearer {auth['key_id']}|{auth['secret_key']}" } url = f"https://your-site.com{path}" response = requests.request(method, url, json=data, headers=headers) return response.json() ```