bs-agent 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -36,7 +36,11 @@ function App() {
36
36
 
37
37
  // 2. Use the agent in your components
38
38
  function ChatComponent() {
39
- const agent = useAgentContext("your-agent-id", "https://your-agent-url.com");
39
+ const agent = useAgentContext(
40
+ "your-agent-id",
41
+ "https://your-agent-url.com",
42
+ "your-access-key", // Optional
43
+ );
40
44
 
41
45
  const handleSend = () => {
42
46
  agent.handleSend("Hello, agent!");
@@ -91,6 +95,7 @@ function AgentChat() {
91
95
  const agent = useAgentContext(
92
96
  "my-agent-id", // Unique identifier for your agent
93
97
  "https://agent-url.com", // Your agent's endpoint URL
98
+ "your-access-key", // Access key for authenticated requests (sent as Bearer token)
94
99
  );
95
100
 
96
101
  // Send a message
@@ -139,7 +144,7 @@ The `useAgentContext` hook returns an `AgentRunner` object with:
139
144
 
140
145
  ```tsx
141
146
  function SessionList() {
142
- const agent = useAgentContext("agent-id", "agent-url", "access-key");
147
+ const agent = useAgentContext("agent-id", "agent-url");
143
148
 
144
149
  return (
145
150
  <div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bs-agent",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "A React library for integrating BuildShip AI agents into your frontend applications.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",