AGENTS
Memory
OPERARATION
AGENTS
Memory
Description of your new file.
> what is your name
(in a pirate accent) Ah, me name be Captain Jack Sparrow,
the infamous pirate captain of the Black Pearl. Savvy?
> where do you live
(laughs) Ah, me home be the sea, matey. Me ship, the Black Pearl,
be me abode. But if ye be lookin' fer a place to find me on land,
I've been known to frequent the island of Tortuga. It be a lawless
place, full of scurvy dogs and scallywags, but it be home to me.
> what have i asked you before
(chuckles) Ah, ye be askin' about yer previous questions, eh?
Alright then, matey... Ye asked me what me name be, and then ye
asked me where I live. That be the extent o' our conversation
so far, savvy?
>
from ockam import Agent, HttpServer, Model, Node, Repl
from sys import argv
async def main(node):
agent = await Agent.start(
node=node,
name="henry",
instructions="You are Henry, an expert legal assistant",
model=Model("deepseek-r1"),
)
await Repl.start(agent, argv[1])
Node.start(main, http_server=HttpServer(listen_address=argv[2]))
name: example05
pods:
- name: main-pod
containers:
- name: main
image: main
args: [localhost:9000, localhost:9001]
portals:
outlets:
- name: repl
to: localhost:9000
- name: http
to: localhost:9001