From a21feda2ccf6cccfd56b00b5a7bd5008e745dc86 Mon Sep 17 00:00:00 2001 From: Lorenze Jay Date: Mon, 25 Nov 2024 16:20:51 -0800 Subject: [PATCH] added doc --- docs/concepts/knowledge.mdx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/concepts/knowledge.mdx b/docs/concepts/knowledge.mdx index ce0203e13..eee98d960 100644 --- a/docs/concepts/knowledge.mdx +++ b/docs/concepts/knowledge.mdx @@ -57,6 +57,24 @@ crew = Crew( result = crew.kickoff(inputs={"question": "What city does John live in and how old is he?"}) ``` +## Appending Knowledge Sources To Individual Agents +Sometimes you may want to append knowledge sources to an individual agent. You can do this by setting the `knowledge` parameter in the `Agent` class. + +```python +agent = Agent( + ... + knowledge={ + "sources": [ + StringKnowledgeSource( + content="Users name is John. He is 30 years old and lives in San Francisco.", + metadata={"preference": "personal"}, + ) + ], + "metadata": {"preference": "personal"}, + }, +) +``` + ## Embedder Configuration