Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,41 @@ That's it! Your agent is now live at `http://localhost:3773` and ready to commun

<br/>

## Minimal Agent Example (Echo Agent) — sanity check

If you want to test Bindu locally without tools or external dependencies, here is the smallest possible working agent:

```python
from bindu.penguin.bindufy import bindufy

def handler(messages):
return [{"role": "assistant", "content": messages[-1]["content"]}]

config = {
"author": "your.email@example.com",
"name": "echo_agent",
"description": "A basic echo agent for quick testing.",
"deployment": {"url": "http://localhost:3773", "expose": True},
"skills": []
}

bindufy(config, handler)
```
Run:
```
python examples/echo_agent.py
```
Test the agent with any message:
```
curl -X POST http://localhost:3773/messages \
-H "Content-Type: application/json" \
-d '[{"role": "user", "content": "Hello Bindu!"}]'
```
Expected response:
```
"Hello Bindu!"
```

## 🎨 Chat UI (Optional)

Want a beautiful chat interface for your agent? - It's available as part of the Bindu ecosystem. - https://localhost:3773/docs
Expand Down
22 changes: 22 additions & 0 deletions examples/echo_agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
Minimal Bindu agent — responds with whatever the user sends.
Useful as a sanity check that Bindu is installed and running correctly.
"""

from bindu.penguin.bindufy import bindufy


def handler(messages):
# Reply with the user's latest input
return [{"role": "assistant", "content": messages[-1]["content"]}]


config = {
"author": "gaurikasethi88@gmail.com",
"name": "echo_agent",
"description": "A basic echo agent for quick testing.",
"deployment": {"url": "http://localhost:3773", "expose": True},
"skills": []
}

bindufy(config, handler)