The Spanora Setup Agent Skill guides users through integrating Spanora AI observability into their projects. It is designed for developers looking to enhance LLM monitoring and tracking in their applications.
$ npx skills add https://github.com/spanora/skills --skill spanora-setupThe Spanora Setup Agent Skill automates the integration of Spanora AI observability into your project, supporting JavaScript/TypeScript and Python environments. It detects your project language and installed AI SDKs—including Vercel AI, Anthropic, OpenAI, and LangChain—then configures the optimal integration pattern automatically. The skill guides you step-by-step through setup, from API key configuration to instrumenting LLM call sites, ensuring every AI execution produces a trace for full observability. Ideal for developers building AI agents and applications who need to monitor LLM performance, track costs, and gain insight into agent behavior without manual configuration.
Install the skill using `npx skills add https://github.com/spanora/skills --skill spanora-setup`
Add Spanora for AI observability
Setup LLM monitoring easily
Track AI costs with Spanora
Instrument agents for performance insights
$ npx skills add https://github.com/spanora/skills --skill spanora-setupgit clone https://github.com/spanora/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Help me integrate Spanora AI observability into my [PROJECT_TYPE, e.g., Python web application, React dashboard, or Node.js backend]. I need to set up monitoring for LLM interactions, track token usage, and log model responses. Provide step-by-step instructions for adding Spanora's SDK to my project and configuring it with my [API_KEY]. Include code snippets for [LANGUAGE, e.g., Python or JavaScript] and best practices for error handling and data validation.
### Spanora Integration Guide for Your React Dashboard
Here’s a step-by-step walkthrough to integrate Spanora into your React dashboard (e.g., a customer support tool) to monitor LLM interactions:
---
#### **1. Install the Spanora SDK**
Run this in your project directory:
```bash
npm install @spanora/react-sdk
```
#### **2. Initialize Spanora in Your App**
Add this to your main `App.js` or entry file:
```javascript
import { SpanoraProvider } from '@spanora/react-sdk';
function App() {
return (
<SpanoraProvider apiKey="your_api_key_here" projectId="your_project_id">
{/* Your existing app components */}
</SpanoraProvider>
);
}
```
#### **3. Wrap Your LLM Calls**
For example, if you’re using OpenAI’s API in a chat component:
```javascript
import { useSpanora } from '@spanora/react-sdk';
function ChatComponent() {
const { trackLLMInteraction } = useSpanora();
const handleSendMessage = async (message) => {
const response = await fetch('/api/chat', {
method: 'POST',
body: JSON.stringify({ message }),
});
const data = await response.json();
// Track the interaction with Spanora
trackLLMInteraction({
model: 'gpt-4',
input: message,
output: data.response,
tokensUsed: data.usage?.total_tokens,
timestamp: new Date().toISOString(),
});
return data.response;
};
// ... rest of your component
}
```
#### **4. Verify Setup in Spanora Dashboard**
- Log in to your [Spanora dashboard](https://app.spanora.ai).
- Navigate to **Projects > Your Project > Observability**. You should see real-time logs of your LLM interactions, including:
- Input/output pairs
- Token usage
- Latency metrics
---
#### **Troubleshooting**
- **401 Errors**: Double-check your `apiKey` and `projectId` in the provider.
- **Missing Data**: Ensure `trackLLMInteraction` is called *after* the LLM response is received.
- **Performance Impact**: Spanora’s SDK adds <5ms overhead per call—negligible for most use cases.
For advanced setups (e.g., custom logging, error tracking), refer to the [Spanora Docs](https://docs.spanora.ai).
Let me know if you’d like help debugging a specific issue!Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan